Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 Public
TT.T
Last edited May 3, 2021
Created on May 3, 2021
Forked from Mouth Follower

This example demonstrates how to load a CSV dataset and display its summary statistics as text, using React state to track the data as it loads asynchronously. The `d3.csv` function fetches the CSS named colors dataset from a GitHub gist, and a custom `message` utility calculates and formats the data’s size in kilobytes, row count, and column count. The app renders either a loading message or the summary using React’s `useState` and `useEffect` hooks, with the output displayed in a large monospace `<pre>` element rendered as SVG.

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