Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published0🌍 Public
HHowardHan99
Last edited Oct 16, 2021
Created on Oct 16, 2021

This example demonstrates how React and D3 can work together to load and summarize a dataset of CSS named colors. The application uses D3’s `csv` utility to fetch the remote data and React’s `useState` and `useEffect` hooks to manage the asynchronous loading state. Once the data arrives, a custom `message` function computes and displays the file size in kilobytes, the number of rows, and the number of columns using `d3.csvFormat` and array properties. A large monospaced `pre` element renders the result, with “Loading...” shown before the fetch completes.

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.

MIT Licensed

Similar vizzes