🌍 Public
Viewing a saved revision (read-only)
273a5f2da0e749bdabb4b562004842e5
Activity6_Task3 .1
This scatter plot visualizes the Iris dataset, displaying petal length on the x-axis and petal width on the y-axis. Points are colored by species using a switch statement mapping setosa to darkgreen, versicolor to yellow, and virginica to red. The visualization loads CSV data from a GitHub repository using d3.csv, then creates SVG circles positioned with d3.scaleLinear scales. Axes are generated with d3.axisLeft and d3.axisBottom, while width and height adapt to the browser window. The code also reads sepal dimensions but does not use them in the current rendering.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.