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)

6d5b3fe4d6cc4e54a9b67bccee0a8b15

Loading Data with React & D3

0 stars0🌍 Public
JJosephStalnaker
Last edited Jun 28, 2021
Created on Jun 28, 2021
Forked from Mouse Follower

This example demonstrates how to load and summarize a CSV dataset using React and D3. The visualization displays a text summary showing the data’s file size in kilobytes, row count, and column count, initially showing “Loading…” until the data arrives. The code uses React’s `useState` and `useEffect` hooks to manage data state, and D3’s `csv` function to fetch and parse the remote CSV file, followed by `d3.csvFormat` to calculate the formatted size. The data source is a gist containing CSS named colors.

AI-generated description

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