7. Loading and Filtering External Data

In this chapter, we’ll cover how to load data from external data files. A lot of the data you’ll find on the web comes in one of a number of standard formats, and it’s often way more convenient to use those files directly than it is to hard code the data into your script. By the end of this chapter, you will have made an age distribution bar chart where you can change the year on display simply by changing the value of a single variable in your code.

Building a Graphic that Uses All of the Population Distribution Data

Let’s start this chapter with a goal.

Throughout this entire book, we’ve been working toward an interactive bar chart in D3 that displays the age distribution of the world’s population, starting ...

Get Visual Storytelling with D3: An Introduction to Data Visualization in JavaScript™ 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.