Skip to main content
100%

Loading Data with React and D3

✓ Published1🌍 Public
WWilliam Couturiaux
Last edited Apr 12, 2021
Created on Apr 6, 2021
Forked from Mouse Follower

This example shows how React state and D3 utilities work together to load and summarize a dataset of CSS named colors. The application displays a text message reporting the dataset’s size in kilobytes, row count, and column count once the data arrives, or a “Loading…” placeholder before that. The code uses the `useState` and `useEffect` hooks to manage the asynchronous fetch, while `d3.csv` retrieves the data from a GitHub gist URL. React renders the message as SVG text, and `d3.csvFormat` calculates the byte size.

AI-generated description

A program that loads data about CSS named colors with D3 utilities and uses React state to keep track of the data.

MIT Licensed

Similar vizzes