Beer Explorer React
This example visualizes the classic Iris dataset as a scatter plot, with sepal length on the x-axis and petal length on the y-axis, using SVG circles to represent each flower sample. The visualization is built using React for component management and D3 for rendering, specifically employing `d3.scaleLinear` for coordinate scaling and `d3.axisLeft`/`d3.axisBottom` for the axes. Data is loaded asynchronously from a CSV file via a custom `useData` hook and D3's `csv` parser. The code demonstrates a decoupled architecture where D3 handles the SVG manipulation within a React wrapper, suitable for scaling to more complex 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: