This video is available to students only

Getting set up

We're going to breeze through the first four steps: accessing our data, creating our dimensions, drawing our canvas, and creating our scales.

Getting set up#

We've already done a few of the steps, since they should be really familiar by now: we've grabbed our data, created square dimensions, and drawn our canvas.

Accessing the data#

To start, let's create our data accessors. Doing this up front will remind us of the structure of our data, and let us focus on drawing our chart later.

Let's look at the first data point by logging it out to our console after we fetch our data:

Our dataset

Since we already know what our final chart will look like, we can pull out all of the metrics we'll need. Let's create an accessor for each of the metrics we'll plot (min temperature, max temperature, precipitation, cloud cover, uv, and date).

 

This page is a preview of Fullstack D3 Masterclass

Please select a discussion on the left.