Skip to main content
100%

Loading Data with React and D3

✓ Published1🌍 Public
Sstephanie0215
Last edited Sep 28, 2022
Created on Sep 28, 2022
Forked from Mouse Follower

This example demonstrates how to load external data in a React application using D3 utilities, displaying dataset metrics such as file size, row count, and column count once the data arrives. The code uses React’s `useState` and `useEffect` hooks to manage the asynchronous loading of a CSV file from a GitHub gist via `d3.csv`, storing the parsed result in component state. While loading, a simple "Loading..." message appears, and after fetching, the `message` function formats the data summary into a large `<pre>` element. React 16.9 and D3 v7 are the primary libraries, with SVG reserved but not actively used for rendering.

AI-generated description

A program that loads in some data using D3 utilities, and uses REACT state to keep track of the data.

MIT Licensed

Similar vizzes