Melting Data for Multiple Lines
✓ Published1🌍 Public
This visualization shows how regional populations change over time from 1950 to 2100, with each region drawn as a smooth multi-line path using d3.line with curveBasis. The data comes from UN population estimates, processed by melting wide-format CSV files into tidy long-form data. A color legend using d3.scaleOrdinal with schemeCategory10 identifies each region, while axes are generated with d3.axisLeft and d3.axisBottom with custom tick formatting. The code demonstrates key d3 patterns including nested data grouping via d3.nest and reusable legend components.
AI-generated descriptionMIT Licensed