Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Scatter Plot React & D3 (codeAlong)

Public visualization

Viewing a saved revision (read-only)

5b90b2bd2dda468e9c4e446b8d0be703

Scatter Plot React & D3 (codeAlong)

0 stars2🌍 Public
Ttomahawk-jupiter
Last edited Jun 12, 2021
Created on Jun 5, 2021

This scatter plot displays iris flower measurements, plotting sepal length against sepal width to reveal correlations between the two traits. The visualization uses React to manage component state and render SVG elements, while D3 v6 utilities like `scaleLinear`, `extent`, and `csv` handle data loading and scaling. The `useEffect` hook prevents repeated data fetching, and the Iris dataset comes from a remote CSV file hosted on GitHub.

AI-generated description

A program that loads in some data about iris flower proportions using d3 utilities and uses React state to keep track of that data.

Using useEffect from React stops the data from loading repeatedly with every state change. Without this it will re-load constantly.

Use React to render the data onto the page into a scatter plot to help see correlations in the data.