ScatterPlot Practice
This example visualizes the classic Iris dataset as an interactive scatter plot, mapping petal length and petal width onto the x and y axes. Each flower species is represented by a distinct color—setosa in blue, versicolor in green, and virginica in black—with hover tooltips revealing exact coordinate values. The visualization is built using D3 v7 within a React framework, utilizing `scaleLinear`, `axisBottom`, and `axisLeft` for scaling and axes, `symbol` and `scaleOrdinal` for shape generation, and the `join` API to efficiently update SVG paths. The code loads data asynchronously via `d3.csv` and renders to an SVG canvas sized to the browser window.