Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Mmeihaoming
Last edited Nov 26, 2019
Created on Nov 12, 2019

This example visualizes global population trends from 1950 to 2100, showing how different regions change over time as multiple lines. The chart uses `d3.line` with `curveBasis` to draw smooth paths, with color encoding via `d3.scaleOrdinal` and a custom `colorLegend`. Data is melted from wide to long format using a custom `melt` function that processes UN population estimates from two CSV files, concatenating historical estimates with medium-variant projections. The visualization includes axis labels, gridlines, and a legend, with regions sorted by their final population value.

AI-generated description
MIT Licensed

Similar vizzes