Melting Data for multiple lines
✓ Published1🌍 Public
This example visualizes population estimates and projections by region from 1950 to 2100, using multiple overlaid lines to show trends over time. The view encodes time on a linear scale and population on a log-free axis, with a categorical color legend identifying each region. The underlying dataset is merged from two UN CSV files using a custom data-melting process that reshapes wide-format rows into long-format records. The chart uses d3.scaleTime, d3.scaleLinear, d3.nest, and d3.line with curveBasis to render smooth paths, while a reusable colorLegend component draws the SVG legend.
AI-generated descriptionMIT Licensed