Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Mmaru25-alt
Last edited Jun 3, 2020
Created on Jun 3, 2020

This example visualizes population over time by region using multiple smoothed lines, with a color legend and axis labels. It relies on D3 v5 APIs including `nest()`, `scaleTime`, `scaleLinear`, `scaleOrdinal`, `axisBottom`, `axisLeft`, and `line()`, rendering with SVG. Data is melted from wide to long format using a custom function, combining UN population estimates (1950–2014) with medium-variant projections (2015–2100) loaded via `csv`. Lines are drawn with `curveBasis` and sorted by final population value.

AI-generated description
MIT Licensed

Similar vizzes