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)

2daab4956423428fb35e4f5fed1b1a97

Loading Data with React & D3

0 stars1🌍 Public
TThomas Cormican
Last edited Jan 7, 2022
Created on Jan 5, 2022
Forked from Mouse Follower

This example demonstrates how React and D3 can work together to load and summarize a dataset of CSS named colors. The visualization displays a text-based summary showing the file size in kilobytes, row count, and column count once the data finishes loading. The code uses React’s `useState` and `useEffect` hooks to manage the loading state, while D3’s `csv` function fetches the remote CSV file. The `message` function formats the output using `d3.csvFormat` to calculate the data size.

AI-generated description

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