The problem


Every chart in this course so far has used a hardcoded array sitting in a dedicated file. Unfortunately, real-world data is often much messier than that.

This lesson summarizes the kinds of complexity you run into in the real world. A dedicated lesson then tackles each one.

Members only
5 minutes read

Life is tough!

We've built many graphs already, and you should be able to draw almost anything on a screen by now.

However, our datasets have always looked perfect so far. A clean JavaScript object that always looked a bit like this:

const data = [
  { country: 'USA', value: 12 },
  { country: 'France', value: 9 },
  { country: 'Japan', value: 7 },
];

Sometimes life is as simple as this. But often, a whole bunch of complexity shows up. Here are the problems you can run into, with a link to the lesson that explains how to fix each one.

๐Ÿ“ฆ Data is not always in JSON

JSON is the best-case scenario for us JavaScript developers, as it's pretty much the same thing as a JavaScript object.

But data can come in many other formats: .csv, .xlsx, GeoJSON, and more. There are tools and techniques to deal with them too!

๐Ÿงน Data can be messy

Real data has missing values, the wrong types, and the wrong shape.

Some data wrangling is almost always necessary: filtering, grouping, merging, reshaping, aggregating... Let's see how to perform those everyday tasks that make up a big part of a data analyst's life!

๐Ÿ›œ Data can be remote

A lot of applications visualize dynamic data. You might want to track the evolution of the Bitcoin price, or query your company's database for the latest sales.

In that case, your app fetches the data from another web server and displays it once it arrives. Let's see how this is possible with JavaScript.

Oh no! ๐Ÿ˜ฑ

It seems like you haven't enrolled in the course yet!

Join many other students today and learn how to create bespoke, interactive graphs with d3.js and React!

Enrollment is currently closed. Join the waitlist to be notified when doors reopen:

Or Login