Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Melting Data for Multiple Lines

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed