Skip to main content
100%

Loading Data with React and D3

✓ Published0🌍 Public
MMichael Bergerson
Last edited Dec 23, 2020
Created on Dec 23, 2020
Forked from Mouse Follower

This example demonstrates how to load and display CSV data within a React application using D3 utilities. The app fetches a dataset of CSS named colors from a GitHub gist via the `d3.csv` method, storing the result in React state with the `useState` and `useEffect` hooks. Once loaded, a summary message is rendered as large SVG text, showing the file size in kilobytes, row count, and column count using `d3.csvFormat`. While data is loading, the display simply shows the text “loading,” providing a clear visual state transition.

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