Selecting a Year on a Line Chart
✓ Published0🌍 Public
This line chart visualizes population over time for different world regions, from 1950 to 2100, using a dashed vertical line to mark a user-selected year. Hovering over the chart updates the selection, which re-renders the visualization. The code employs D3 v5's `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line`, and `nest` APIs, with SVG rendering. Data is loaded from UN population estimate and medium-variant CSV files, processed via a custom melt function that filters region names.
AI-generated descriptionMIT Licensed