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)

95086d61df51401fbdd68e568e62c059

Loading Data with React and D3

0 stars1🌍 Public
AAndy Chang
Last edited Sep 27, 2022
Created on Sep 27, 2022
Forked from Mouse Follower

This example demonstrates a minimal React and D3 integration for loading and summarizing a remote CSV dataset. It fetches the data from a GitHub Gist containing CSS named colors, then displays the number of rows, columns, and file size in kilobytes. The code uses D3’s `csv` function with `useEffect` to load data asynchronously, stores the result in React state via `useState`, and renders a message built with `d3.csvFormat`. The interface shows a large loading text until the dataset arrives.

AI-generated description

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