React & D3 Starter
✓ Published1🌍 Public
This example displays the classic Iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis, with points colored by species (red, blue, or green). It serves as a starter template for integrating D3.js with React by decoupling the visualization logic into separate modules. The React component manages the SVG container and data loading via hooks, while the D3 code handles scales, axes, and circle rendering using d3.csv, d3.scaleLinear, and d3.axisBottom/axisLeft. The visualization fills the browser window and includes axis labels.
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