Skip to main content
100%

Loading data with React

✓ Published1🌍 Public
LLove Wessman
Last edited Jan 19, 2022
Created on Jan 19, 2022
Forked from Mouse Follower

This example demonstrates how to load and display CSV data in a React application, showing a text summary of the dataset size and structure. It uses React state (`useState`) to hold the fetched data and the `useEffect` hook to trigger the data loading. The code fetches a CSS named colors dataset via `d3.csv`, then formats the results with `d3.csvFormat` to count bytes, rows, and columns. A loading message appears until the data arrives, at which point the summary replaces it.

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