🌍 Public
Viewing a saved revision (read-only)
a3d81177fa4a427bb425ddd48a4f2a5c
Fork of Selecting a Year on a Line Chart
This visualization shows population trends over time for world regions using a multi-line chart, with a vertical line indicating the currently selected year. Users can hover over the chart to change the selected year, which updates the vertical marker. The chart is built with D3 v5, using `scaleLinear`, `scaleTime`, `d3.line` with `curveBasis` for smoothing, and `d3.nest` to group data by region. A color legend is rendered via a custom `colorLegend` function using `scaleOrdinal`. Population data is loaded from CSV census files and processed through a custom `melt` function.
AI-generated description