Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data w/ React and D3

Public visualization

Viewing a saved revision (read-only)

1c088fbfa3384350a16d3f68b89d9acb

Loading Data w/ React and D3

0 stars0🌍 Public
RRaphael Fogha
Last edited Sep 3, 2021
Created on Sep 3, 2021
Forked from Mouse Follower

This example demonstrates how to load external CSV data with D3 and manage it through React state. The app uses `d3.csv` to fetch a dataset from a GitHub gist, storing the parsed result via React's `useState` and `useEffect` hooks. While the data loads, the screen displays “loading”; once available, a custom `message` function reports the dataset’s size in kilobytes, row count, and column count as large SVG text. The visualization is minimal, focusing on the integration of D3's data-loading utilities with React's component lifecycle.

AI-generated description

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