Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Ssafdarawan
Last edited Jun 1, 2020
Created on Jun 1, 2020

This example shows population over time by region for the world, displaying multiple smooth lines on a chart with a color legend to distinguish regions. The data is melted from a wide CSV format into tidy rows, combining historical estimates from 1950 to 2014 with medium-variant projections from 2015 to 2100 from the UN. The chart uses D3 v5’s `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line` with `curveBasis`, `nest` for grouping by region, and custom axis and legend components. Lines are rendered as SVG paths with a multiply blend mode, and the axis labels use custom formatting for population values.

AI-generated description
MIT Licensed

Similar vizzes