Melting Data for Multiple Lines
✓ Published0🌍 Public
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 descriptionMIT Licensed