ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1949 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Visual Storytelling with D3
S. King
Addison-Wesley (2015)
Frances Buontempo
JavaScript visualisation library for HTML and SVG
Appeared in:

Reviewed: January 2015

D3 is a JavaScript visualisation library for HTML and SVG, which you can either download or link directly to in a script element on your html. There are several online tutorials, but reading a real dead-tree book from time to time is enjoyable.

This book developed a narrative, starting by drawing a barchart in html, then moving on to using JavaScript, and after introducing the use of svg on a web-page, showed how to use D3 selections and data joins to do the same thing. It ends with a dynamic example that ‘plays’ through bar charts for various years of data.

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.