Fullstack D3 Masterclass
The Fullstack D3 masterclass is the complete guide to D3. With dozens of code examples showing each step, you will gain new insights into your data by creating visualizations in this self-paced online course.
- 4.3 / 5 (43 ratings)
- Published
- Updated
10 hrs 51 mins
77 Videos
01Remote
You can take the course from anywhere in the world, as long as you have a computer and an internet connection.
02Self-Paced
Learn at your own pace, whenever it's convenient for you. With no rigid schedule to worry about, you can take the course on your own terms.
03Community
Join a vibrant community of other students who are also learning with Fullstack D3 Masterclass. Ask questions, get feedback and collaborate with others to take your skills to the next level.
04Structured
Learn in a cohesive fashion that's easy to follow. With a clear progression from basic principles to advanced techniques, you'll grow stronger and more skilled with each module.
How to build your first D3 chart
Importance of information design
How to integrate D3 with Angular
When to use D3 - and when not to
How to animate and add interactions
How to create any visualization you can imagine
Charts communicate ideas with simplicity, clarity, and detail.
Once you're comfortable with D3 you can quickly:
- understand key metrics at a glance
- catch anomalies (before they turn into problems)
- give key insights to your customers
- and impress your boss and co-workers
Today, I will show you the exact methods I use to create beautiful, understandable data visualizations using D3.
Our students work at
Sample Course Lessons
Course Syllabus and Content
Making Your First Chart
12 Lessons 55 Minutes
We dig in right away, starting with a timeline of temperature over time. First, we need to get our bearings.
First things first, we learn how to load our dataset and look at the structure.
We learn how to set up our chart - accessor functions are crucial for easy changes, documentation, and framing.
To set up our chart environment, we learn why we need two containers: wrapper and bounds.
We create our wrapper and learn about d3 selection objects.
We learn how to create new elements inside of a d3 selection object.
We create our bounding box, and shift it to respect our margins.
We learn about scales and create our first ones: our y and x scales.
We learn about path SVG elements and how to construct a string for their d attribute.
We learn how to create axes and transform them into position.
Let's consolidate what we just learned with an exercise to play with this week.
Making a Scatterplot
11 Lessons 54 Minutes
We dive into making a slightly more complex chart: a scatter plot. In this lesson, we talk about why you would create a scatter plot and its basic anatomy.
We solidify our foundation by splitting our chart-creating code into seven general steps.
We talk through our first step: accessing our data.
The second step: creating chart dimensions. This time, we learn how to create a square chart that fits within any browser window.
The third step: drawing our canvas. We create our wrapper & bounds, then shift them to respect our margins.
The fourth step: creating our scales. We talk about scales in more depth, and learn about d3.extent() & .nice().
The fifth step: drawing our data. This is an important lesson! We talk about data joins, which are one of the trickiest parts of d3, and necessary for updating our charts & binding our visualization to data.
Our sixth step: drawing peripherals. We draw our axes, learn about the text SVG element, and how to add (and rotate) labels.
Our hard work completed, we sit back and talk about what insights our chart can teach us.
We learn how to create a custom color scale, then we color our circles based on another metric: cloud cover.
Let's consolidate what we just learned with an exercise to play with this week.
Making a Bar Chart
11 Lessons1 Hours 13 Minutes
Next, we embark on a mission to create a slightly more complex chart: a bar chart. We talk about what we can learn from a bar chart, and what a histogram is.
Next, we grab our data and create our accessor function (only one this time!)
A hopefully familiar step by now: creating our chart dimensions.
Creating our wrapper and bounds elements.
We create our scales, but first, we learn how to split our data into equally-sized bins.
We finally get to draw our bars! We draw them in groups, so we can position them as well as labels.
We draw a label over each bar, showing the number of points within that bin.
We draw a line depicting the mean of our distribution, as well as our axes.
We talk about how to generalize our code, and change it so that we draw multiple histograms for different metrics.
This is a great lesson, and one that's hard to find good content on. We talk about the ways to make our charts accessible to screen readers, and walk through changing our histogram.
Let's consolidate what we just learned with an exercise to play with this week.
Animations and Transitions
6 Lessons 51 Minutes
We talk about the different ways we can animate changes in our charts, and rule out SVG .
We learn about CSS transitions and the different CSS transition properties, then run through a concrete example and look at how to debug them.
We add CSS transitions to our histogram, animating changes as the bars change.
We learn about d3.transition, and talk about when we would use it instead of CSS transitions. We then update our histogram to animate using d3.transition.
We talk through a more complex example: animating our line chart when it gets new data. This is trickier than it might seem at first!
Let's consolidate what we just learned with an exercise to play with this week.
Interactions
7 Lessons1 Hours 19 Minutes
Let's start talking about adding interactions to our charts!
We learn how to add interaction event listeners using our d3 selection objects, then run through a concrete example.
We can't let our event listeners hang around forever - we learn how to clean up after ourselves and cancel old ones.
We add a tooltip to our histogram. This involves creating a tooltip, updating its contents to show information about the hovered bar, and moving above the hovered bar.
We add a tooltip to our scatter plot. Along the way, we learn about d3.timeFormat and learn a great trick for making our tooltips feel smoother, using voronoi.
Lastly, we add a tooltip to our timeline. We talk about how to add a listener rectangle, d3.leastIndex(), and how to add a dot to mark our place.
Let's consolidate what we just learned with an exercise to play with this week.
Data Visualization Basics
10 Lessons 49 Minutes
It's really important that we understand the fundamentals of data visualization design, and what kind of chart to create.
We talk about the different types of data: the main buckets of qualitative and quantitative metrics, and their sub-categorizations.
We talk about the different ways to visualize a single metric, and how to combine that with the different data types.
We talk through a few tips & tricks that I use when designing charts.
We run through a full redesign of a chart, learning about the motivation and implementation of each change.
Choosing colors is one of the hardest parts of designing a data visualization! We talk about the three main types of color scales, and related functions that are built into d3.
We learn how to create our own custom color scales and specify their color space.
We learn about three color spaces (rgb, hsl, and hcl) and the pros and cons of each.
We talk about a few tips & tricks for choosing effective, accessible colors for our data visualizations.
Let's consolidate what we just learned with an exercise to play with this week.
Advanced example
12 Lessons2 Hours 15 Minutes
Let's dive into a complicated data visualization: a circular chart showing overall weather for the whole year
We're going to breeze through the first four steps: accessing our data, creating our dimensions, drawing our canvas, and creating our scales.
We're going to skip step 5 and use step 6 to get our feet wet with angular math. We'll draw angular grid lines for each month, circular grid lines for temperature, and label both axes.
To ease into our drawing data step, let's start by adding a circle that shows what temperatures are below freezing.
We create a radial area shape, bounded by the min and max temperatures for each day. Then we create a gradient and use it to color our area.
We add marks to show which days are above a certain UV index threshold.
Next, we'll add our ring of circles around the outside to represent the amount of cloud cover for each day. We'll also learn something really important about visualizing data using circles.
Next, we learn about ordinal scales and create the inner ring of circles to show the precipitation probability and type for each day.
We'll add annotations to our chart to tell our viewer what the different parts of the chart are showing. To do this, we'll create a generic function, since there are so many things to label.
Onto our last step: adding interactions! The tooltip we'll build will be unlike any you've seen before - it will follow the mouse all the way around our chart, highlight the relevant data elements, and describe the weather for that hovered date.
A quick debrief! Congrats on making it through!
Let's consolidate what we just learned with an exercise to play with this week.
D3 + Javascript Frameworks
12 Lessons1 Hours 12 Minutes
We'll talk about the best way to incorporate d3 when using a javascript framework like React, Svelte, or Angular.
We are introduced to React.js and learn a basic principle for combining d3 + React.
We walk through the structure of our React application, then dive into the first step of our chart drawing checklist: accessing our data
Creating dimensions in React can be really easy! We use a custom hook for watching the size of our wrapper and automatically calculating the dimensions of our bounds.
We create our wrapper and bounds within our Chart component to prevent from having to repeat ourselves for every chart we create.
Next, we need to create our scales. We also create scaled accessor functions to pass to the children of our Timeline, so they don't need to know about our scales.
Next, we fill out our Line component for a flexible way to draw our data.
We take a naive approach to creating an Axis component
We learn an alternate, less hacky solution for creating an Axis component that lets React do all of the rendering.
We wrap up by talking about how to add interactions and look at the completed code for a Timeline, Scatter plot, and Histogram.
We take a look at how to combine d3 + Angular, with a complete codebase.
We take a look at how to combine d3 + Svelte.js, with a complete codebase.
Interviews
5 Lessons1 Hours 18 Minutes
Coming soon! Interviews with amazing experts in the data visualization field. You'll learn about how different people get into data visualization, what most excites them, and their tips & tricks.
Shirley and I talk about her job title, how she got into data visualization, how working in industry is different than working as a freelancer, and her new book!
Ian and I talk about his long history of building up the d3.js community, his day-to-day working at Observable, and the value of breaking projects down into small pieces.
Russell Goldenberg talks to us about what it's like working at the Pudding, his journey from Comp Sci to creative computation, and drops some great tips for working on data viz projects.
Will Chase talks us through how he got into data viz, the difference between work and freelance projects, and walks us through his most recent, wonderful visualization of hurricane names.
Subscribe for a Free Lesson
By subscribing to the newline newsletter, you will also receive weekly, hands-on tutorials and updates on upcoming courses in your inbox.
What Students are Saying
Meet the Course Instructor
Purchase the course today
Frequently Asked Questions
Who is this course for?
If you know JavaScript and you need to build dashboards and you'd like to learn D3 as quickly and efficiently as possible.
What if I need help?
You can ask us questions anytime through the community Discord channel or by sending us a message.