Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React and D3

Public visualization

Loading Data with React and D3

0 stars2🌍 Public
Aangelathacker123
Last edited Feb 9, 2022
Created on Feb 9, 2022

This example demonstrates how to load and summarize CSV data asynchronously using React and D3. It fetches the CSS named colors dataset from a GitHub gist via D3's `csv` function, storing the result in React state with the `useState` and `useEffect` hooks. The rendered view displays a plain-text summary of the loaded data, including size in kilobytes, row count, and column count, calculated using `d3.csvFormat`. Until the data arrives, a “loading” message appears.

AI-generated description

A program that loads in the data using D3 utilities, and uses React state to keep track of that data.

Comments

Sign in to join the discussion.

MIT Licensed