29
D3.js for beginners What is data visualization ?

D3.js for beginners

Embed Size (px)

Citation preview

Page 1: D3.js for beginners

D3.js for beginnersWhat is data visualization ?

Page 2: D3.js for beginners

Kota FujishiroFront end web developer

Internship at LIG.inc

Page 3: D3.js for beginners

D3.js

https://d3js.org/

Page 4: D3.js for beginners

What’s data visualization ?

Page 5: D3.js for beginners

You can understand somethingvaguely at first sight.

Page 6: D3.js for beginners

William Playfair(1759 – 1823)

He is a political economist and the founder of graphical methods of statistics.

Page 8: D3.js for beginners

How to make data visualization?

Page 9: D3.js for beginners

D3.js

https://d3js.org/

Page 10: D3.js for beginners

The Most Detailed MapsYou’ll See From the Midterm Elections

http://www.nytimes.com/interactive/2014/11/04/upshot/senate-maps.html

Page 12: D3.js for beginners

A lot of samples

https://github.com/d3/d3/wiki/Gallery

Page 13: D3.js for beginners

The basic flow of D3.js

1.Data(JSON,XML,XSV…etc)2.Driven(Bind the data.Output follow the data.)3.Documents

Page 14: D3.js for beginners

The basic idea to understand D3.js1.MethodChain It similar with jQuery. d3. is same to $. Result of before method is input value of next method.

2.Scale Adjust input dataset to output range. d3.min : get minimum value of dataset. d3.max : get maximum value of dataset. range : designate maximum and minimum value of output range.

3,DataMethod It keeps data. And the we can select each data.

Page 15: D3.js for beginners

simple histogram

Page 16: D3.js for beginners
Page 17: D3.js for beginners
Page 18: D3.js for beginners

samples

Page 19: D3.js for beginners

samples

Page 20: D3.js for beginners

samples

Page 21: D3.js for beginners

samples

Page 22: D3.js for beginners

samples

Page 23: D3.js for beginners

About Data Binding

The .enter() command matches the selectAll statement with the number of elements in the array/object, and determines the number of elements that will need to be created.

Page 24: D3.js for beginners

About Data Binding

The .enter() command matches the selectAll statement with the number of elements in the array/object, and determines the number of elements that will need to be created.

Page 25: D3.js for beginners

About Scale

Scales are functions that map an input domain to an output range.

Page 26: D3.js for beginners

About Scale

For example, If you want to set these dataset to 0px to 450px line,you have to do normalization of numbers.

Page 27: D3.js for beginners

D3.js

https://d3js.org/

Page 28: D3.js for beginners

Future Tasks

https://d3js.org/

1. Get the data using web scraping and write Node.js. Express dynamic data visualization.

2. Learn how to write React.js with D3.js

Page 29: D3.js for beginners

Thanks!