🌍 Public
Viewing a saved revision (read-only)
f7f1ff3f543e41fabab1b83ccd646939
Selecting a Year on a Line Chart
This line chart displays population trends over time for world regions, with a visual selection mechanism for a specific year (2019). The visualization uses D3 v5 to render an SVG, loading data from UN population estimates CSV files. The code employs `d3.nest()` to group data by region, `d3.scaleTime` and `d3.scaleLinear` for axes, and a custom color legend built with `d3-selection`. A `parseYear` function converts year values, while the chart updates interactively when a new year is selected.
AI-generated description