🌍 Public
Viewing a saved revision (read-only)
37c0cf3cf94641d89f502bde0b9de0fb
Melting Data for Multiple Lines
This example shows population trends over time by region, with each region represented as a separate colored line. The visualization uses D3 v5 to load and process UN population estimates from CSV files, then melts the data into a tidy format using custom logic. Multiple lines are rendered with d3.line and curveBasis, while an ordinal color scale with a legend distinguishes regions. Axes are drawn using d3.axisBottom and d3.axisLeft, and the chart updates based on nested data sorted by final population values.
AI-generated description