Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 Public
Aadam
Last edited Sep 16, 2021
Created on Sep 16, 2021
Forked from MouseFollower

This example demonstrates how to load external data in a React application using D3 utilities, displaying the dataset’s size in kilobytes, row count, and column count. The component uses React’s `useState` and `useEffect` hooks to fetch and store data asynchronously, while D3’s `csv` function parses the remote CSV file from a GitHub gist. The message is rendered conditionally, showing “Loading…” until the data arrives. The code also uses `d3.csvFormat` to calculate the data size in the `message` function.

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