Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published0🌍 Public
AAliaksandr
Last edited Dec 29, 2020
Created on Dec 29, 2020

This example demonstrates how React and D3 work together to load and summarize a dataset of CSS named colors. It fetches a CSV file containing color names and their RGB values using D3’s `csv` utility, then stores the parsed result in React state via the `useState` and `useEffect` hooks. While the data is loading, the app displays “Loading...”; once loaded, it renders a message showing the file size in kilobytes, the number of rows, and the column count, computed with D3’s `csvFormat` and `data.columns`.

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