Data Visualization with d3.js by Swizec Teller

Data Visualization with d3.js by Swizec Teller

Author:Swizec Teller
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2018-09-25T16:00:00+00:00


For instance, if you want to find the time an hour from now, you'd do this:

> d3.time.hour.offset(new Date(), 1) Tue Feb 19 2013 06:09:17 GMT+0100 (CET)

And find out it's getting really late and you should stop writing books about JavaScript, and go to bed.

Geography

Other useful data types are geospatial coordinates, often used for weather or population data; anything where you want to draw a map.

d3.js gives us three tools for geographic data: paths produce the final pixels, projections turn sphere coordinates into Cartesian coordinates, and streams speed things up.

The main data format we'll use is TopoJSON, a more compact extension of GeoJSON, created by Mike Bostock. In a way, TopoJSON is to GeoJSON what DivX is to video. While GeoJSON uses the JSON format to encode geographical data with points, lines, and polygons, TopoJSON instead encodes basic features with arcs and re-uses them to build more and more complex features. As a result, files can be as much as 80 percent smaller than when we use GeoJSON.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.