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 stars2🌍 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

Comments

Sign in to join the discussion.

MIT Licensed