Getting started with d3 | Book Review

Start learning how to make visuals using d3

Link for Americans Link for Brits

I first discovered d3 about 3 months ago. Since then I’ve been in awe at the stunning visuals the d3 community have been making. Most of my work has involved using Mike Bostock’s own examples and taking them apart before making my own d3 visuals.

Getting started with d3 is the first “official” book on the subject that I’ve found, by O’Reilly. It covers the basics of how to structure your code when putting together a d3 driven visual. You’ll need to be familiar with html (so be used to seeing <things> like </this>. You’ll also need to know a tiny bit about javascript and CSS, just knowing that you wrap javascript in <script> tags and write your CSS at the top to style your visual is about enough.

Chapter 1:

We learn that the examples in this book will make use of a public dataset, The New York Metropolitan Transit Authority. Not the most exciting but it lends itself well to making useful visuals (everyone likes to know when their next train will arrive). Most of the examples in this book use data that is already in JSON format. Most of my data is always in CSV so this was a bit disappointing. I understand that I can get around this issue but it would be nice for future editions of this book to cover more data formats. Every knows a CSV format and can easily make it without any trouble, the same can’t be said about JSON in my opinion.

Chapter 2:

We jump straight in and start making a d3.js visual. The first visual is actually a list, but it’s a good example to help explain what’s going on when building a visual. [...]