Day 97 of 180 Days of Data Viz Learning #jfdi

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.

Code Learning:

D3 Nests Explained in Under Five Minutes

Three Takeaways:

  • Example:
    • var property_nest = d3.nest() //
      propertyNest.key(function(d) { return}) //
      property.entries( // 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
  • In D3 nest roll-up, data is transformed. Keys just re-arrange.
  • Nest only creates new objects, data doesn’t change

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s