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)

1567e794f0484737a9ca8d5bef244fa2

Loading data with React and D3

0 stars1🌍 Public
Mmaxthamt
Last edited Mar 12, 2021
Created on Mar 12, 2021
Forked from Mouse follower

This example demonstrates how to load and summarize a CSV dataset using D3 and React. The code fetches a list of CSS named colors via `d3.csv` and stores the result in React state with the `useState` and `useEffect` hooks. While loading, the display shows “loading,” then renders a message generated by `d3.csvFormat` that reports the data’s size in kilobytes, row count, and column count. React 16.9 and D3 v5 are used together, with the data sourced from a GitHub gist.

AI-generated description

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