Skip to main content
100%

Iris Scatter Plot

✓ Published1🌍 Public
Ssumanthsomu1
Last edited Mar 24, 2023
Created on Mar 24, 2023
Forked from HTML Starter

This scatter plot visualizes the Iris dataset, displaying sepal width against petal length. Each point represents a flower sample, with iris species distinguished by both shape—circles for setosa, crosses for versicolor, and diamonds for virginica—and color via a legend. The visualization uses D3.js v7 to create an SVG with linear scales and axis generators, loading data from a CSV file. Customizable axes allow viewers to explore relationships between any pair of the four measured features.

AI-generated description

Iris Scatter Plot

This project creates a reusable scatter plot for the Iris dataset using D3.js. The plot differentiates the iris species by shape and includes a legend to indicate the species.

Getting Started

  1. Clone or download the repository.
  2. Run npm install to install the required dependencies.
  3. Run npm start to start the development server.
  4. Open your browser and navigate to http://localhost:8080/.

Customization

You can change the features displayed on the x-axis and y-axis by modifying the arguments passed to the Scatterplot constructor in index.js. The available features are:

  • 'petal_width'
  • 'sepal_width'
  • 'petal_length'
  • 'sepal_length'
MIT Licensed

Similar vizzes