🌍 Public
Viewing a saved revision (read-only)
550db6018eff437eab19e7275fc68497
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