Viewing a saved revision (read-only)
768d119980f14385acb432f50f3217c3
reusable scatter
This example presents a reusable scatter plot that cycles through four numeric measurements from the Palmer Penguins dataset—bill length, bill depth, flipper length, and body mass—updating the x-axis every two seconds. The visualization shows the relationship between the selected x-axis variable and bill depth on the y-axis, with each point representing an individual penguin. Built with D3 v7, the code defines a custom `scatterPlot` function using scale methods like `scaleLinear`, `extent`, and axes via `axisLeft` and `axisBottom`, while rendering SVG circles with a fixed radius. Data is loaded as CSV from a GitHub Gist, and the animation relies on `setInterval` to swap the x-value accessor and re-render the chart.
AI-generated description