Skip to main content
100%

Loading Data with React & D3

✓ Published1🌍 Public
ZZoe Ferencova
Last edited Mar 6, 2023
Created on Mar 6, 2023

A React and D3 example demonstrates loading a CSV dataset from a GitHub gist using D3's `csv` function, with React's `useState` and `useEffect` hooks managing the asynchronous data fetch. The app displays a text summary—row count, column count, and file size in kilobytes—calculated via D3's `csvFormat`. A loading message appears until the data arrives, and the final output is rendered inside a `<pre>` element. The example uses React 18, D3 v7, and the production UMD builds of both libraries.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes