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)

226fc2ddf3204558bdc47c6ad214f24b

Loading Data with React & D3

0 stars1🌍 Public
SSonja Ek
Last edited May 29, 2021
Created on May 29, 2021
Forked from Mouse Follower

This example demonstrates how to load and display dataset metadata using React and D3. The code fetches a CSV file of CSS named colors via D3’s `csv` utility, stores the parsed data in React state through the `useState` and `useEffect` hooks, and renders a summary using the `message` function. The summary reports the formatted file size in kilobytes, row count, and column count. D3’s `csvFormat` calculates the data size, while React manages the asynchronous loading state, showing “Loading...” until the data arrives.

AI-generated description

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