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)

04f43aedab804af2af945d8e2c577d66

Melting data for multiple lines

0 stars1🌍 Public
MMatthiasVanCampen
Last edited Feb 14, 2020
Created on Feb 14, 2020

This example visualizes population trends over time for multiple regions, displaying separate lines for each region from 1950 to 2100. The data is sourced from UN population estimates and is processed by reshaping wide-format CSV data into a tidy format using custom functions. The visualization uses D3 v5 with SVG rendering, employing `d3.line` with curve interpolation, `d3.scaleTime` and `d3.scaleLinear` for axes, and `d3.nest` to group data by region. A color legend is rendered using a custom function that utilizes `d3.scaleOrdinal` with `d3.schemeCategory10`.

AI-generated description