Fork of React & D3 Starter
✓ Published0🌍 Public
This example presents a scatter plot of the Iris dataset, mapping sepal length to the x-axis and petal length to the y-axis. It demonstrates a decoupled React and D3 integration pattern for scalable projects, rendering circles as SVG elements within a React component. The code uses D3’s `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` for scales and axes, while React manages component state and lifecycle. Data is loaded asynchronously from a CSV file using D3’s `csv` function, with the visualization wrapped in a reusable `viz` function.
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