24
Vizualising Data With D3 Punit Jajodia Co-founder, adhuro.com

Visualizing data with d3

Embed Size (px)

Citation preview

Page 1: Visualizing data with d3

Vizualising Data With D3

Punit Jajodia

Co-founder, adhuro.com

Page 2: Visualizing data with d3

Why data viz?

Page 3: Visualizing data with d3

Apple today announced financial results for its fiscal 2014 firstquarter ended December 28, 2013. The Company postedrecord quarterly revenue of $57.6 billion and quarterly netprofit of $13.1 billion, or $14.50 per diluted share. These

results compare to revenue of $54.5 billion and net profit of$13.1 billion, or $13.81 per diluted share, in the year-agoquarter. Gross margin was 37.9 percent compared to 38.6

percent in the year-ago quarter. International sales accountedfor 63 percent of the quarter’s revenue.

Page 4: Visualizing data with d3

I get it, times are good

Page 5: Visualizing data with d3

What is D3?

• Javascript Library for manipulating documents based on data

• A (really awesome) tool used to visualize data• Created by Mike Bostock in 2011

Page 7: Visualizing data with d3

Understanding Entry and Exit

Page 8: Visualizing data with d3

D3 basic – Enter and Exitvar dataset = [5, 10, 20, 15, 18];d3.select(“svg") .attr(‘id’,”abc”) .selectAll(“circle”) .data(dataset) .enter() .append(“circle”)

Page 9: Visualizing data with d3

D3 basic – Enter and Exitvar dataset = [5, 10, 20, 15, 18];d3.select(“svg") .attr(‘id’,”abc”) . selectAll(“circle”) .data(dataset) .enter() .append(“circle”)

Empty Selection

Page 10: Visualizing data with d3

D3 basic – Enter and Exitvar dataset = [5, 10, 20, 15, 18];d3.select(“svg") .attr(‘id’,”abc”) . selectAll(“circle”) .data(dataset) .enter() .append(“circle”)

Page 11: Visualizing data with d3

D3 basic – Enter and Exitvar dataset = [5, 10, 20, 15, 18];d3.select(“svg") .attr(‘id’,”abc”) . selectAll(“circle”) .data(dataset) .enter() .append(“circle”)

Page 12: Visualizing data with d3

D3 basic – Enter and Exit

d3.select(“svg") .attr(‘id’,”abc”) . selectAll(“circle”) .data(dataset) .enter() .append(“circle”)

var dataset = [5, 10, 20, 15, 18];

Page 13: Visualizing data with d3

D3 scales

Page 14: Visualizing data with d3
Page 15: Visualizing data with d3
Page 16: Visualizing data with d3

The power of D3

Page 17: Visualizing data with d3
Page 18: Visualizing data with d3
Page 19: Visualizing data with d3

Where do we go from here?

Page 21: Visualizing data with d3

Humanitarian Data Exchange

Page 23: Visualizing data with d3

Find out what we are doing right, what needs improvement

http://bit.ly/nep-dev-survey

Page 24: Visualizing data with d3

Questions?