Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 Public
TTRANDONGXYZ
Last edited Jan 16, 2022
Created on Jan 14, 2022
Forked from Mouse Follower

This example demonstrates how to load and summarize a CSV dataset using D3 utilities within a React application. It shows a text-based overview of the data, displaying the file size in kilobytes, row count, and column count, initially showing a "Loading..." message. The code fetches a CSS named colors CSV from a GitHub gist using `d3.csv`, stores the result in React state via `useState` and `useEffect`, and formats the statistics with `d3.csvFormat`. The output is rendered as SVG text inside a `<pre>` element using ReactDOM.

AI-generated description

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

MIT Licensed

Similar vizzes