Introduction to D3 and how it plays nicely with node to create real time visualizations. Code samples available at https://github.com/nategood/d3-intro
◦ Not a Flot ◦ Not a Google Charts ◦ At least not out of the box • Not a framework for drawing ◦ Not a Raphael.js ◦ Not a KineticJS ◦ Not a DSL for Canvas or SVG
to take a data set and bind it to DOM elements • Data ◦ Any set of data ▪ [4,3,2,3,4] ▪ [{"name":"Nate"}, {"name":"Mike"}] • DOM Elements ◦ Everything from spans to svg elements
• Handles changing datasets ◦ A surprising PITA without D3 • and other nasty parts of data visualization ◦ Scaling, Animation, Data Set Operations • It is future proof! ◦ Not a wrapper library (Raphael) ◦ Relies on standards
elements • Once bound we can use this data to update each individual DOM element • Recall functions as values... var bs = d3.selectAll("div.buckets"); bs.data([3,2,1]); bs.text(function(d) {return d;});