Skip to main content
100%

Loading Data with React and D3

✓ Published0🌍 Public
Vvigneswaran009
Last edited May 10, 2021
Created on May 10, 2021

This example demonstrates how React state and D3 utilities can work together to load and summarize external data. It fetches a CSV file of CSS named colors from a GitHub gist using D3’s `csv` method, then displays concise statistics about the dataset. The React `useState` and `useEffect` hooks manage the asynchronous data loading and trigger a re-render. A custom `message` function formats the output, showing the file size in kilobytes, row count, and column count using `d3.csvFormat`. Before the data arrives, the interface shows "loading...".

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