Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

5- Loading Data with React & D3

Public visualization

5- Loading Data with React & D3

0 stars0🌍 Public
Mmayhob
Last edited Feb 20, 2022
Created on Feb 20, 2022

This example shows how React and D3 work together to load and summarize a CSV dataset of CSS named colors. The app displays a text readout with the file size in kilobytes, row count, and column count once the data arrives, or a "Loading..." placeholder beforehand. It uses React's `useState` and `useEffect` hooks to manage asynchronous state, and D3's `csv` function to fetch and parse the remote data. The `message.js` helper formats the summary using `d3.csvFormat` to calculate the byte length.

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.

Comments

Sign in to join the discussion.

MIT Licensed