Skip to main content
100%

Loading data with React and D3

✓ Published1🌍 Public
Kkragovic
Last edited Mar 30, 2021
Created on Mar 30, 2021
Forked from Mouse Follower

This example demonstrates how to load data with React and D3, displaying a summary of a CSV file containing CSS named colors. The app uses the `useState` and `useEffect` hooks to manage data loading, while `d3.csv` fetches the data from a GitHub gist URL. Once loaded, the data is passed through a custom `message` function that calculates the file size, row count, and column count using `d3.csvFormat`, `d3.data.columns`, and `data.length`. The result is rendered inside a `<pre>` element, with a "Loading..." placeholder shown before the data arrives.

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