Skip to main content
100%

Loading Data with React & D3

✓ Published1🌍 Public
CChristian Potdevin
Last edited Mar 21, 2021
Created on Mar 21, 2021
Forked from Mouse follower

This example demonstrates how React and D3 can work together to load and summarize a CSV dataset. It fetches a list of CSS named colors from a GitHub gist using D3’s `d3.csv` utility, storing the parsed data in React state via the `useState` and `useEffect` hooks. While the data loads, it displays a loading message; once available, it shows the file size in kilobytes, row count, and column count, computed with `d3.csvFormat`. The visualization is minimal—just text in a `<pre>` element—but clearly illustrates the data-loading workflow.

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