I’m doing some form of data visualization learning for 180 days because I need to #JFDI.
See post explaining how and why I’m doing this.
D3 Nests Explained in Under Five Minutes
Three Takeaways:
- Example:
- var property_nest = d3.nest() //
propertyNest.key(function(d) { return d.group}) //
property.entries(data.properties) // activate our nest and output transformed version of input
propertyNest.roll(function(S) { return d3.sum(s, function(d) {return d.oprice})}) // return rollup to property nest to get total cost of properties
- var property_nest = d3.nest() //
- In D3 nest roll-up, data is transformed. Keys just re-arrange.
- Nest only creates new objects, data doesn’t change
Leave a Reply