React & D3 Starter
This starter example displays the classic Iris flower dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis, with semi-transparent circles and labeled axes. It uses React hooks—specifically `useState` and `useEffect`—to load and manage the CSV data, while D3 v7’s `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` handle scaling and axis rendering. The visualization integrates React and D3 by delegating SVG circle creation and axis updates to a decoupled `viz` function, demonstrating a scalable pattern for real-world projects.
AI-generated descriptionExported from VizHub: React & D3 Starter.
This 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!