🌍 Public
Viewing a saved revision (read-only)
3981eee2235a450bb74ded45a2adf21f
Reusable scatter plot_ICE7
This reusable D3 scatter plot visualizes tourist visit data across three years (2019–2021) for various places, showing the relationship between 2021 and 2019 visitor numbers. The chart animates every two seconds, cycling the x-axis through each year's data while the y-axis remains fixed on 2019. Built with D3 v6, it uses `scaleLinear`, `extent`, and axis functions (`axisLeft`, `axisBottom`) within a custom `scatterPlot` function. SVG circles represent data points, with margins and radius configurable. Data loads from a CSV file parsed by `csv`, and the animation uses `setInterval` to update the x-value accessor and re-render.
AI-generated descriptionReact Starter code.