Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with React and D3

Public visualization

Viewing a saved revision (read-only)

10be6fa9a7ae4e43ba7a11197e262b48

Loading data with React and D3

0 stars2🌍 Public
GGayan Priyadarshana
Last edited Jul 27, 2023
Created on Jul 27, 2023
Forked from Mouse Follower

This example demonstrates how to load and summarize a remote CSV dataset using React state and D3 utilities. It fetches data from a GitHub gist via `d3.csv`, displays a loading message while the data is pending, and renders the file size in kilobytes, row count, and column count using `d3.csvFormat`. The visualization is a simple SVG-free text output, with React managing the asynchronous data flow through `useState` and `useEffect`, while D3 v7 handles the CSV parsing and formatting.

AI-generated description

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