Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Viewing a saved revision (read-only)

5f1b5e27bcc84219aa032805a91ff7c2

Melting Data for Multiple Lines

0 stars1🌍 Public
Bbprokopowicz
Last edited Apr 6, 2020
Created on Apr 6, 2020

This example visualizes population projections for global regions from 1950 to 2100 as multiple smoothed lines, each colored by region via an ordinal color scale and accompanied by a legend. The chart uses d3.scaleTime, d3.scaleLinear, d3.axisLeft, and d3.axisBottom to render axes, while d3.line with d3.curveBasis draws the paths. Data is loaded from CSV files and melted into a tidy format before rendering as SVG.

AI-generated description

D3 course follow along.