Skip to main content
100%

Load data with React & D3

✓ Published1🌍 Public
AAlexander Dorling
Last edited May 12, 2021
Created on May 12, 2021
Forked from Mouse follower

This example demonstrates a minimalist approach to loading external data in a React component alongside D3, displaying the dataset's size in kilobytes, row count, and column count as large text. The application fetches a CSV file of CSS named colors from a GitHub gist using D3's `csv` function, storing the parsed result in React state via a `useEffect` hook. While loading, it shows a "Loading..." message, and once the data arrives, it computes the file size using D3's `csvFormat` method and renders the summary using a custom `message` module.

AI-generated description

loads data using d3 and react state

MIT Licensed

Similar vizzes