Activity6_Task3
✓ Published0🌍 Public
This example visualizes the Iris dataset as a scatter plot, mapping petal length and width to the x- and y-axes while coloring each point by species (setosa, versicolor, or virginica). The code uses d3.csv to load the data, d3.scaleLinear with d3.extent for scales, and d3.axisLeft and d3.axisBottom to render the axes. Circles are drawn with SVG attributes set via d3 joins, and each point’s fill color is assigned through a switch statement. The visualization reads data from a remote gist URL and renders entirely within an SVG canvas, with axis labels styled in green and a red title displayed above the plot.
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.
MIT Licensed