Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 Public
Kkeitheade
Last edited Nov 1, 2021
Created on Nov 1, 2021
Forked from Mouse follow

This example demonstrates how to load external CSV data into a React application using D3 utilities, displaying a simple status message that changes from “loading” to “loaded” once the data arrives. The code uses React’s `useState` hook to track the data state and D3’s `csv` function to fetch and parse the data from a local `data.csv` file. It also calculates the file size in kilobytes using `d3.csvFormat` and reports the row and column counts in a console message. The interface is minimal, showing only the loading state text.

AI-generated description

This program loads in data using D3 utilities, and React state to keep track of the data.

MIT Licensed

Similar vizzes