Reusable D3 Scatter Plot
This interactive scatter plot displays the Iris dataset, with each point colored by species. The visualization cycles through different x-axis variable mappings every two seconds, animating transitions between petal width, sepal width, petal length, and sepal length. Built with D3 v6, it uses `scaleLinear`, `scaleOrdinal`, `axisLeft`, `axisBottom`, and `setInterval` to update the chart. The reusable `scatterPlot` function encapsulates the chart logic, while SVG circles and legend elements render the data, which is loaded via `d3.csv` from a GitHub Gist.