Melting Data for Multiple Lines
✓ Published0🌍 Public
This example shows population over time by region as multiple smoothed lines, using a color legend to distinguish regions. The data is melted from wide to long format in `loadAndProcessData`, combining UN population estimates (1950–2014) with medium-variant projections (2015–2100). D3 v5 APIs include `d3.nest`, `d3.line` with `curveBasis`, `d3.scaleTime`, `d3.scaleLinear`, and `d3.scaleOrdinal`. A custom `colorLegend` function renders SVG legends, while axes use `d3.axisBottom` and `d3.axisLeft` with tick formatting via `d3.format`.
AI-generated descriptionMIT Licensed