Fork of React & D3 Starter
✓ Published0🌍 Public
This example demonstrates a scatterplot of the Iris dataset, plotting sepal length against petal length as semi-transparent circles rendered in SVG. It uses React to manage the component lifecycle, with a `useData` hook loading CSV data via `d3.csv` and a `VizWrapper` component using `useEffect` and `select` to invoke the D3 `viz` function. D3 scales (`scaleLinear`, `extent`) and axes (`axisLeft`, `axisBottom`) are employed, showcasing a decoupled React and D3 integration pattern for scalable projects.
AI-generated descriptionThis viz is a starter that demonstrates patterns used in real world projects in which complexity is anticipated to scale.
- Decoupled React & D3 integration
- Opening moves for scalable complexity
- Industry standard ES modules and JSX
- Copy-paste into existing projects
Any questions? Ask on Twitter!
Also viewable in:
MIT Licensed