Putting it all together - sequencing animations

Time to put what we've learned to good use. Let's stop creating toys for a second and instead, create an actual chart. We're going to use a dataset of UK prison population from 1900 to 2015, which is available at uk_prison_population_1900-2015.csv in this data/ folder of the book's repository. I used this data to create a similar series of charts for The Times in 2016, with my team trying out several variations similar to the charts you're about to create, before arriving at the style of interaction you'll see in the following section, "Interacting with the user". 

In chapter5/index.js, comment everything out and add the following at the top:

import prisonChart from './prisonChart';(async ...

Get D3.js 4.x Data Visualization - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.