Masteringd3js Course

Design and build beautiful data visualizations with d3.js. An intensive introduction to the D3 library (V6).

Last updated 2022-01-10 | 4.4

- Understand the fundamental building blocks of D3
- Gain a wide breadth of knowledge
- learning how to create 14 different visualizations
- Critique existing visualizations and invent better designs for displaying data

What you'll learn

Understand the fundamental building blocks of D3
Gain a wide breadth of knowledge
learning how to create 14 different visualizations
Critique existing visualizations and invent better designs for displaying data
Interpret open source code from the D3 community for use in your own projects
Master advanced tools in D3
building choropleth maps
brushes
tooltips
and layouts
Develop substantial web apps
with multiple visualizations on the page at once
Articulate original abstract ideas with compelling sketches

* Requirements

* Students should have a good understanding of HTML
* CSS
* and JavaScript
* Students should know how to interact with the Document Object Model (DOM) using jQuery

Description

Welcome to Mastering data visualization in D3.js!

This course will take you from a beginner level in D3 to the point where you can build virtually any visualization that you can imagine. The course will teach you to program in the latest version of D3 - version 6.x.

Course Outline

In the first phase of the course, I will be building up your knowledge of D3 and introducing you to some of the most foundational topics in data visualization. You will:

  • Understand what SVGs are and how to they work with D3.

  • Discover how D3 associates shapes with pieces of data.

  • Write scales, axes, and labels to make some basic visualizations.

  • Use the D3 update pattern to shift the position of SVGs as our data changes.

  • Handle user interactions by adding events to the page.

  • Add legends, tooltips, and sliders to your visualizations.

The course will also focus on data visualization design, helping you to make better decisions about how to structure your code, and teaching you to justify the decisions that you make to others. You will learn how to select the right visual channels for the data that you're working with to create completely unique visualizations.

In the second phase of the course, I will be taking you on a crash course through 12 new visualizations. You will gain a wide breadth of knowledge in D3, as I will be walking you through pre-written code from members of the D3 community. I'll introduce you to D3 layouts, and I will be showing you how to build each of these visualizations in D3:

  • Line Charts

  • Area Charts

  • Stacked Area Charts

  • Pie Charts

  • Donut Charts

  • Wordclouds

  • Choropleth Maps

  • Node-Link Diagrams

  • Tree Diagrams

  • Treemaps

  • Circle Packs

  • Sunburst Plots

This part of the course will also teach you the skill of finding new visualizations by yourself, adapting open source code to fit with your own data.

In the final phase of the course, I will be showing you the proper file structure to use for managing multiple visualizations on the page at once. You will be able to create visualizations that can communicate with one another, allowing you to link user interactions between multiple different graphs. You'll also learn how to use brushes in D3 to select areas on the chart with the drag of a mouse.

Class Projects

The course will include 4 class projects for you to complete, which will give you the opportunity to practice your D3 skills with real data:

  1. A simple bar chart to display the revenue growth of a small coffee chain.

  2. An updating bubble chart, cloning a famous visualization from Gapminder.

  3. An interactive line chart, showing historical cryptocurrency prices over time.

  4. A data dashboard for a large conglomerate company.

Each of the projects will gradually become more complex as the course progresses.

Should I Take This Course?

D3 is an incredibly powerful library to use, with a strong community of developers which is growing every day. Students should take this class if they want to get a rigorous introduction to D3, which covers a wide range of different topics.


This course is not an introductory course to web development. Students are expected to have had experience coding in JavaScript, HTML, CSS, and jQuery before enrolling in this course.

Who this course is for:

  • Anyone who has a passion for working with data
  • Anyone who is curious about data visualization design
  • Anyone who wants to build complex interactive websites with D3js

Course content

11 sections • 99 lectures

Introduction to the course Preview 02:24

What is a data visualization? Preview 02:59

Activity: Your favorite visualization Preview 00:22

The power of D3 Preview 04:30

How this course is structured Preview 03:03

Section Summary Preview 00:42

Course GitHub Repository Preview 00:24

Introduction - Getting started with D3 Preview 00:51

Setting up your environment Preview 05:18

Understanding SVGs Preview 06:20

Adding SVGs with D3 Preview 06:53

Activity: Adding SVGs to the screen Preview 00:38

Selections and data joins Preview 04:51

Loading external data Preview 07:43

Activity: Your first visualization! Preview 00:50

Section Summary Preview 00:44

Introduction - Scales and Axes Preview 01:06

Linear Scales Preview 05:41

Logarithmic Scales Preview 03:17

Time Scales Preview 01:29

Ordinal Scales Preview 02:42

Band Scales Preview 06:06

D3 min, max, and extent Preview 04:23

Scales in D3

Test your knowledge at working with scales in D3.

Margins and groups Preview 06:37

Axes and labels Preview 06:54

Making a bar chart Preview 04:46

Project 1: StarBreak Coffee Preview 02:21

Activity: Project 1 Preview 01:29

Section Summary Preview 00:52

Introduction - The basics of design Preview 01:03

Designing for clarity Preview 03:20

Subjectivity in design Preview 03:18

Activity: Critiquing visualizations Preview 00:20

The design toolkit Preview 05:29

An introduction to sketching Preview 05:44

Activity: Making sketches Preview 00:23

The Bootstrap grid system Preview 03:56

Section Summary Preview 00:43

Introduction - Make it dynamic Preview 01:29

Looping with intervals Preview 02:22

Adding an update function Preview 04:09

The D3 update pattern Preview 05:53

Updates in D3

Test your knowledge of what you've learned so far about the D3 update pattern.

Making our chart dynamic Preview 03:09

D3 Transitions Preview 05:47

Scatter plots in D3 Preview 01:49

Project 2: Gapminder Clone Preview 03:11

Activity: Project 2 Preview 02:19

Section Summary Preview 01:07

Introduction - Make it interactive Preview 01:03

Adding a legend Preview 03:11

Formatting and parsing in D3 Preview 06:52

Introducing Tooltips Preview 08:15

Event listeners and handlers in D3 Preview 10:16

Adding a jQuery UI slider Preview 04:38

Line graphs in D3 Preview 08:07

Project 3: CoinStats Preview 02:43

Activity: Project 3 Preview 01:57

Section Summary Preview 01:12

Introduction - Frequently used visualizations Preview 01:29

Using the D3 community Preview 04:23

Migrating code to version 5.x Preview 05:08

D3 Layouts Preview 05:19

Area Charts Preview 08:08

Stacked Area Charts Preview 13:32

Data structures and D3 nests Preview 07:00

Pie and donut charts Preview 17:01

Wordclouds Preview 05:51

Layouts in D3

Test your knowledge of how layouts work in D3 to help us build visualizations.

Section Summary Preview 00:54

Introduction - Maps and Networks Preview 01:12

Visualization around the globe Preview 07:57

Loading multiple datasets with D3 Preview 05:04

Choropleth Maps Preview 09:03

Forces in D3 Preview 08:24

Node-Link Diagrams Preview 08:45

Maps and Networks

Test out what you learned in this lecture about visualizing maps and networks.

Section Summary Preview 01:08

Introduction - Hierarchical Data Preview 01:34

Building hierarchies in D3 Preview 05:03

Tree Diagrams Preview 05:28

Treemaps Preview 07:54

Circle Packing Preview 05:58

Sunburst Plots Preview 08:43

Activity: Find your own visualization Preview 01:02

Section Summary Preview 01:21

Introduction - File structure and linked views Preview 01:10

File Separation Preview 03:27

Visualizations as Objects Preview 07:27

Converting our code to OOP Preview 07:53

Handling events across objects Preview 06:49

D3 Brushes Preview 08:35

Project 4: A corporate data dashboard Preview 04:13

Activity: Project 4 Preview 01:46

Section Summary Preview 01:01

Introduction - Wrapping up the course Preview 00:54

What you learned Preview 01:57

Concluding Thoughts Preview 01:30