Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with react & D3

Public visualization

Viewing a saved revision (read-only)

7309580434884209b4b991cdf3852a32

Loading data with react & D3

0 stars0🌍 Public
Mmk3737
Last edited Apr 6, 2022
Created on Apr 6, 2022
Forked from Mouse Follower

This example demonstrates how to load external data in a React application using D3, displaying the loaded dataset’s size, row count, and column count in a large <pre> element. The app uses React’s useState and useEffect hooks to manage the data state and trigger the asynchronous fetch, while d3.tsv loads the CSV file from a GitHub gist URL. A separate message.js module formats the summary using d3.tsvFormat, and the interface initially shows “loading” until the data arrives.

AI-generated description

a program that loads in data using D3 and uses React state to keep track of the data