Skip to main content
100%

Loading data with React

✓ Published0🌍 Public
JJosoArenas
Last edited Jul 1, 2021
Created on Jul 1, 2021
Forked from Following circle

This example shows how to load and summarize a CSV dataset using React state management. D3’s `csv` utility fetches the data, while React’s `useState` and `useEffect` hooks track the loading state and store the parsed result. The visualization displays a plain-text summary of the dataset, listing its size in kilobytes, row count, and column count, computed with `d3.csvFormat`. Before the data arrives, the interface shows a "Loading..." message. The data comes from a remote GitHub gist containing CSS named colors.

AI-generated description

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

MIT Licensed

Similar vizzes