Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

React + Observable

Public visualization

Viewing a saved revision (read-only)

fe94f70126dd43cf99667d6ef961e017

React + Observable

0 stars0🌍 Public
RRiderman de Sousa Barbosa
Last edited Jun 15, 2022
Created on Jun 15, 2022
Forked from React Starter

This example demonstrates how to embed an Observable Plot visualization inside a React application. It displays the classic Iris dataset, plotting petal length against petal width with points colored by species. The code uses `Plot.plot` and `Plot.dot` from `@observablehq/plot`, while React's `useRef` and `useEffect` manage the DOM element. Data is loaded asynchronously via `d3.csv` with `autoType`, and the chart fills the full browser window.

AI-generated description

React Starter code.