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

Comments

Sign in to join the discussion.

MIT Licensed