Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with React

Public visualization

Loading data with React

0 stars1🌍 Public
PPriteshlip10
Last edited Aug 7, 2021
Created on Aug 6, 2021
Forked from Mouse Follower

This example demonstrates how to load a CSV dataset of CSS named colors using React state and D3’s `csv` utility. The app fetches the data once via `useEffect`, stores it in a `useState` hook, and displays a text summary showing file size in kilobytes, row count, and column count. The rendering relies on React’s `ReactDOM.render` and the `d3.csvFormat` method for calculating the file size, with a loading message shown until the asynchronous data request resolves.

AI-generated description

A program that loads in some data about CSS named Colors using some d3 utilities and uses React Sate to keep track of the data

Comments

Sign in to join the discussion.

MIT Licensed