Assignment 6 - Q2
This scatter plot visualizes the Iris dataset, showing the relationship between sepal length and petal length for 150 flower samples. Each point is colored by species (setosa, versicolor, virginica) using d3.scaleOrdinal, with hover effects that enlarge points via mouseover events. The chart loads data from a CSV hosted on jsDelivr using d3.csv, renders axes with d3.axisBottom and d3.axisLeft, and includes an SVG legend. An accompanying d3.scaleLinear maps data values to pixel coordinates within an 800×600 SVG canvas.
AI-generated descriptionIris Dataset Scatter Plot Visualization
This project visualizes the Iris dataset using D3.js to create a scatter plot showing the relationship between sepal length and petal length, with points colored by species.
How to Run
- Clone or download this repository
- Open
index.htmlin a web browser - The visualization will load automatically
Features
- Scatter plot of sepal length vs petal length
- Points colored by species
- Interactive hover effects
- Responsive design
- Clean, modern styling
Data Source
The visualization uses the Iris dataset from https://raw.githubusercontent.com/datasets/iris/master/data/iris.csv
Technologies Used
- D3.js v7
- HTML5
- CSS3