Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with d3 and react

Public visualization

Loading data with d3 and react

0 stars0🌍 Public
Mmukta1994
Last edited Jun 13, 2021
Created on Jun 13, 2021

This example shows a React component that loads a CSV dataset from a GitHub gist using d3.csv, with the data stored in component state via the useState hook. The rendered output is initially empty, as the App component returns an empty div while the data is being fetched asynchronously. The code includes commented-out SVG markup for a smiley face, suggesting the intended visualization, though it is not currently rendered. The implementation combines React’s useEffect for side effects with d3’s data-loading API, using the d3.v5 library alongside React 16.9.

AI-generated description

Smiley face implementation with React & D3.

Comments

Sign in to join the discussion.

MIT Licensed