Skip to main content
100%

Melting Data for Multiple Lines

✓ Published1🌍 Public
Rrichad97
Last edited Mar 21, 2020
Created on Mar 21, 2020

This visualization shows population over time by region, with multiple smoothed lines drawn from 1950 to 2100 using a basis curve. The code melts wide-format UN population data into tidy rows via a custom `melt` function, then uses `d3.nest()` to group by region and `d3.scaleOrdinal` with `schemeCategory10` for colors. A color legend, axis labels, and gridlines are rendered in SVG. Data merges two CSV sources for estimates and medium-variant projections.

AI-generated description
MIT Licensed

Similar vizzes