activity6_task3(6)
This scatter plot displays the relationship between bill length and flipper length for three penguin species (Adelie, Chinstrap, and Gentoo) from the penguins.csv dataset. Circle color encodes species via a d3.scaleOrdinal, and circle radius encodes body mass. The visualization renders as an SVG using D3.js v7, with linear scales (d3.scaleLinear) mapping the measurements to axes and d3.axisBottom/axisLeft generating the tick marks and labels.
AI-generated descriptionPenguins Scatter Plot Visualization
This project visualizes the Penguins dataset using a scatter plot created with D3.js. The dataset includes measurements of different penguin species, showing the relationship between bill length and flipper length.
Dataset
The dataset contains the following attributes:
- Species: The species of penguin (Adelie, Chinstrap, Gentoo).
- Bill_Length: Length of the penguin's bill in mm.
- Bill_Depth: Depth of the penguin's bill in mm.
- Flipper_Length: Length of the penguin's flipper in mm.
- Body_Mass: Body mass of the penguin in grams.
How to Use
- Clone or download the repository.
- Make sure you have the penguins.csv dataset in the same directory.
- Open the
index.htmlfile in a web browser to view the scatter plot.
Visualization Details
- X-axis: Bill Length (mm)
- Y-axis: Flipper Length (mm)
- Color: Represents different species (Red: Adelie, Green: Chinstrap, Blue: Gentoo)
- Circle Size: Represents body mass (scaled for visualization)
Technologies Used
- HTML/CSS
- JavaScript
- D3.js
License
This project is open-source and available under the MIT License.