Selecting a Year on a Line Chart
✓ Published0🌍 Public
This visualization shows population trends over time for world regions, with a vertical black line marking the currently selected year. Moving the mouse across the chart updates the selected year and repositions the line. The code uses D3 v6 with SVG rendering, employing `scaleTime`, `scaleLinear`, `line` with `curveBasis`, and `axisBottom`/`axisLeft` for axes. Data comes from UN population estimates CSV files, melted into tidy format for visualization. The color legend is built with a custom `colorLegend` function using `scaleOrdinal` and `schemeCategory10`.
AI-generated descriptionMIT Licensed