Skip to main content
100%

Fork of React & D3 Starter

✓ Published0🌍 Public
LLeeTaeEon
Last edited Dec 8, 2022
Created on Dec 8, 2022
Forked from React & D3 Starter

This example visualizes the classic Iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis. It demonstrates a clean separation between React and D3: a React wrapper (`VizWrapper`) manages the SVG element and passes data to a pure D3 `viz` function, which uses `scaleLinear`, `extent`, and `axisBottom`/`axisLeft` to render circles and axes. The visualization uses a React hook (`useData`) to load and parse the CSV via `d3.csv`.

AI-generated description

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!

Also viewable in:

MIT Licensed

Similar vizzes