Melting Data for Multiple Lines
✓ Published0🌍 Public
This example shows population trends over time by region, with multiple colored lines in an SVG chart. The data is processed by melting wide-format UN population estimates into tidy long-form rows using `range` and `timeParse`. The visualization uses `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line` with `curveBasis`, `nest`, and `axisLeft`/`axisBottom`. A custom color legend displays categorical regions, and lines are sorted by their final population value using `descending`.
AI-generated descriptionMIT Licensed