Skip to main content
100%

Activity6_Task3

✓ Published0🌍 Public
HHema Tummapala
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes