Skip to main content
100%

Loading Data w/ React with D3.

✓ Published2🌍 Public
Jjwesterlund412
Last edited Jan 8, 2022
Created on Dec 29, 2021
Forked from Mouse Follower

This example demonstrates loading a CSV dataset of CSS named colors and displaying summary statistics about it. The app uses React hooks (`useState` and `useEffect`) to manage asynchronous data loading, with D3's `csv` utility fetching the remote file. Once loaded, the data is passed through a custom `message` function that calculates file size in kilobytes, row count, and column count using `d3.csvFormat`. The rendered output is a large `<pre>` element showing these metrics, transitioning from a "Loading.." state to the final statistics.

AI-generated description

A program that loads in some data about CSS named colors using D3 utitlities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes