Skip to main content
100%

React + Observable

✓ Published0🌍 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.

MIT Licensed

Similar vizzes