Fork of React & D3 Starter
This visualization presents a scatter plot of emotional states, with each point positioned by x and y coordinates derived from survey responses. The chart encodes user-reported emotions like "Desire," "Enthusiastic," and "Loved" in a 2D space, likely representing dimensions of emotional valence and arousal. Built with React and D3 v7, the code uses a `useData` hook to load CSV data and a `viz` function that constructs an SVG via D3's selection API. The project demonstrates a decoupled React-D3 integration pattern, where the `VizWrapper` component manages the SVG element and invokes the D3 rendering logic through a ref.
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: