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)

e8eb6b4b287c4ca6ac270cf8087519ad

Loading Data with React & D3

0 stars1🌍 Public
Rroc286
Last edited Feb 28, 2022
Created on Feb 26, 2022
Forked from Mouse Follower

This example demonstrates a minimal workflow for loading and summarizing external data within a React application. It uses the D3 utility `csv` to fetch a remote CSS Named Colors dataset, and React's `useState` and `useEffect` hooks to manage the asynchronous loading process. After retrieval, it displays a text summary generated by a custom `message` function, which reports the data's size in kilobytes, the number of rows, and the number of columns. The visualization itself is a plain text readout, with the loading state showing "loading" until the data arrives.

AI-generated description

A program that loads in some data about CSS Named Colors using D3 utilities, and use React state to keep track of the data.