Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Viewing a saved revision (read-only)

d9f9d3b640de4ba28e928bd87cd8d9d2

Melting Data for Multiple Lines

0 stars0🌍 Public
PPatricio Albornoz
Last edited Oct 21, 2018
Created on Oct 21, 2018

This example visualizes population estimates and projections over time by region, with multiple colored lines tracing each region's trajectory from 1950 to 2100. The chart emphasizes final population values by sorting lines in descending order and using a legend that displays region names with corresponding colors. Built with D3 v5, the code employs `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line`, `curveBasis`, `nest`, and `axisBottom`/`axisLeft` to render the SVG. Data is loaded and melted from two CSV files containing UN population estimates and medium variant projections.

AI-generated description