Skip to main content
100%

Loading data with React and D3

✓ Published2🌍 Public
AAlex Stulov
Last edited Jul 8, 2021
Created on Jul 8, 2021
Forked from Mouse follower

This example demonstrates how to load and display a CSV dataset in a React application, showing a text summary of the data size, row count, and column count once the file is fetched. The code uses React’s `useState` and `useEffect` hooks to manage the asynchronous loading state, while D3’s `d3.csv` fetches the data from a GitHub gist URL and `d3.csvFormat` converts it back to a string to calculate its size in kilobytes. The visualization initially displays “Loading…” and updates to the summary once the data arrives.

AI-generated description

Mouse follower

MIT Licensed

Similar vizzes