Skip to main content
100%

Loading data with React and D3

✓ Published1🌍 Public
Mmaxthamt
Last edited Mar 12, 2021
Created on Mar 12, 2021
Forked from Mouse follower

This example demonstrates how to load and summarize a CSV dataset using D3 and React. The code fetches a list of CSS named colors via `d3.csv` and stores the result in React state with the `useState` and `useEffect` hooks. While loading, the display shows “loading,” then renders a message generated by `d3.csvFormat` that reports the data’s size in kilobytes, row count, and column count. React 16.9 and D3 v5 are used together, with the data sourced from a GitHub gist.

AI-generated description

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

MIT Licensed

Similar vizzes