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)

022b3d5200134d82b8b31fe60d6e27f8

Loading Data with React & D3

0 stars0🌍 Public
Wwindwaver
Last edited Mar 21, 2021
Created on Mar 19, 2021
Forked from Mouse Follower

This example demonstrates how to load external data in a React application using D3 utilities while managing the fetched data with React state. It shows a text summary reporting the dataset's size in kilobytes, row count, and column count. The code uses React's `useState`, `useEffect`, and `useCallback` hooks, alongside D3's `csv` function to load a CSS named-colors CSV from a GitHub gist. The `message` module formats the summary using `d3.csvFormat` to calculate the data’s byte length.

AI-generated description

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