Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity3Tutorial3.2

Public visualization

Viewing a saved revision (read-only)

bcfde0eacd444ec0a2d4c94b69e47d24

Activity3Tutorial3.2

0 stars0🌍 Public
Rramyaraomadhavareddy@gmail.com
Last edited Oct 23, 2024
Created on Oct 23, 2024

This example visualizes the iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis, with each species represented by a distinct shape from D3’s `symbolsFill` array. A legend built with the `shapeLegend` module identifies the species symbols. The code uses D3 v7 (`d3.scaleLinear`, `d3.scaleOrdinal`, `d3.extent`, `d3.symbol`) to construct scales and generate marks via the `symbolGenerator`. Data is fetched as CSV from GitHub, parsed with `d3.csvParse`, and rendered responsively to the full window size. The axes and labels are drawn through a reusable `axes` module.

AI-generated description