Skip to main content
100%

Loading Data with React and D3

✓ Published2🌍 Public
Aangelathacker123
Last edited Feb 9, 2022
Created on Feb 9, 2022

This example demonstrates how to load and summarize CSV data asynchronously using React and D3. It fetches the CSS named colors dataset from a GitHub gist via D3's `csv` function, storing the result in React state with the `useState` and `useEffect` hooks. The rendered view displays a plain-text summary of the loaded data, including size in kilobytes, row count, and column count, calculated using `d3.csvFormat`. Until the data arrives, a “loading” message appears.

AI-generated description

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

MIT Licensed

Similar vizzes