Fork of React & D3 Starter
This React and D3 starter visualizes the classic Iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis with semi-transparent circles. The code demonstrates a decoupled integration pattern, where React manages the component lifecycle in `App.js` and `VizWrapper.js`, while D3 handles rendering through `d3.select`, `scaleLinear`, `extent`, and `axisLeft`/`axisBottom` in `viz.js` and `axes.js`. Data is loaded asynchronously via `d3.csv` in `useData.js`, and the SVG output fills the viewport. This example serves as a scalable template for projects expecting growing complexity.
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: