Skip to main content
100%

Melting data for multiple lines

✓ Published2🌍 Public
AAnShed
Last edited Jul 8, 2020
Created on Jul 7, 2020

This example visualizes population over time for multiple regions using a single chart with multiple lines. It employs a color legend to distinguish regions and a melt operation to reshape the data from wide to long format. The visualization is built with D3 v5, using `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line` with `curveBasis`, and `nest`. Data is loaded from CSV files via `d3.csv` and processed with `timeParse`, `range`, and custom functions. The SVG rendering includes axes with gridlines and a title, with interactive sorting of regions by their final population values.

AI-generated description
MIT Licensed

Similar vizzes