Skip to main content
100%

React & D3 Starter

✓ Published0🌍 Public
CCurran Kelleher
Last edited Jun 5, 2022
Created on Jun 5, 2022

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 description

Exported 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!

Similar vizzes