Skip to main content
100%

Loading Data with React & D3

✓ Published1🌍 Public
Ssophburke
Last edited Sep 17, 2019
Created on Sep 13, 2019
Forked from Mouse Follower

This example shows a React component that loads a CSV file of CSS named colors using D3’s `d3.csv` utility, then displays summary statistics about the dataset within a `<pre>` element. The code relies on React hooks (`useState`, `useEffect`) to manage the asynchronous data loading and render a "Loading..." message until the data arrives. Once loaded, it uses `d3.csvFormat` to calculate the data size in kilobytes, along with row and column counts. The data comes from a gist hosted CSV file, and the interface is built with React 16.9 and D3 v5.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data

MIT Licensed

Similar vizzes