Skip to main content
100%

Melting Data for Multiple Lines

✓ Published1🌍 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.

MIT Licensed

Similar vizzes