Reviewed: January 2015
It is aimed at a beginner, explaining that you cannot use Word as an editor and how to inspect elements and use the console in Chrome. Some of the earlier chapters were devoted to the ‘storytelling’ part of the book, considering when bar chart and lines charts are better, and reminding us that pie charts with more than a few sections can be hard to garner information from. Simpler is usually better. I suspect there are books on these specifics with far more detail about possible graphics for various types of data and things to avoid. I personally didn’t gain much from this short section, but if you’ve never heard of a bar-chart before or can’t remember how they work, it could be useful. It also reminded me how to calculate percentages, so again this is aim at a newbie. Other parts were devoted to explaining what a variable is, a function is, not to be afraid of anonymous functions as well as explaining the difference between a domain and a range. If you have no background in such things, this might be helpful.
One thing that is not immediately obvious from the online docs (after reading them for a total of about 5 minutes) is how to use a data file – lots of the simple examples hard-code the data in an array. The books showed how to run a simple web service using python, which allows the script to read the file, when placed in the same directory as a script. That was useful, since you will want to move beyond hard coding small data sets if you wish to move beyond the basics.
By the end of the book I did actually have code showing a bar chart in a web browser, which I failed to get working first time when I just went to the D3 manual pages, so I gained something from reading this book. It didn’t move beyond bar charts, though it mentioned circles, eclipses and other shapes besides rectangles in the svg section. There are many other things you can do with D3, including trees, Bezier curves, zoomable graphs and so on. I would have preferred a few hints on some other things too and less background things I already know. However, the focus on one data set and how to draw a bar chart of it kept the book focussed and it was very quick to read. It was also well written, even if in a somewhat chatty style in places. I enjoyed reading it, and am glad I did. I feel more confident about exploring some of the other examples on the d3 gallery now. I am not sure how often I would need to refer back to this book though. Certainly a good starting point if you’ve never used D3 before.