})
    .rollup(function(d) { console.log(d) ; return d.subgroup; })
    .entries(data)
  console.log(nestedData)

  // And then to stack the data by subgroups
  var stackedData = d3.stack()
    .keys(subgroups)
    .value(function(d, key){
      console.log(d.values.values)
      return(1)
    })(nestedData)
  console.log(stackedData)
})

</script></xmp></code></pre>
            <!-- ==================================== -->
          </div>
        </div>
      </div>
    </section>
    <br />

    <!-- ===