Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published1🌍 Public
RReymond Mesuga
Last edited Mar 11, 2021
Created on Mar 11, 2021

This example demonstrates a React component that asynchronously loads a CSV file of CSS named colors via D3’s `csv` utility, then displays a summary of the dataset using React’s `useState` and `useEffect` hooks. While the data is fetching, the interface shows a “Loading...” message. Once loaded, it renders a text summary reporting the file size in kilobytes, row count, and column count. The code uses `d3.csvFormat` to calculate the byte size and relies on React’s state management to update the view.

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