top of page

D3.js | 30 days

A 30-day notebook series that bridges the gap between simple D3 tutorials and advanced visualisations, combining explanation with real-world examples.

Year

2021

Clients

Personal

Tools

HTML, CSS, JS, d3.js, Observable, arquero.js

Topics

d3-scales, d3-selection, tooltips, hexbin, multi-line charts, d3-transitions

Description

This project introduces the use of R, RStudio, and ggplot2 for data visualization. The main focus is on ggplot’s layer-based philosophy, which allows a chart to be built incrementally by adding components such as scales, geometries, and annotations. Learners are guided through an exploratory workflow that begins with broad questions, such as “How is life expectancy changing over time?”, and gradually refines insights through encodings, filtering, and highlighting. Alongside these fundamental workflows, the presentation also showcases more innovative visualization types, such as dumbbell plots, density plots, beeswarm charts, waffle charts, and parallel sets. Both the underlying theory and the practical R code are shared, ensuring students not only see the results but understand how to build them.

Learnings

Through this project I gained a deep understanding of how ggplot’s layer-based grammar of graphics works. I also learned how to use exploratory analysis as a stepwise process: beginning with large patterns, then zooming in through filtering, small multiples, and outlier highlighting. Building examples with real datasets gave me a better sense of how exploration naturally evolves into storytelling.

Challenges

One of the main challenges was maintaining clarity and cleanliness in the charts. Even though ggplot makes it easy to generate a basic plot, achieving a professional-level visualisation often required many fine-tuned adjustments. Another challenge was learning to implement advanced customization in ggplot. While the syntax is logical, some details (like custom legends or annotations) required deep dives into documentation and experimentation.

Impact

The teaching presentation gave students not only a toolkit of R and ggplot functions, but also a way of thinking about visualisation as an exploratory process. This prepared them to analyze real datasets with confidence and build narratives around them.

bottom of page