Skip to main content
100%

Loading Data with React & D3

✓ Published1🌍 Public
GGonzalo Alarcón Usui
Last edited Dec 2, 2021
Created on Dec 2, 2021
Forked from Mouse Follower

This example demonstrates how to load and summarize external CSV data within a React application using D3. The interface displays a text summary of the dataset, including file size in kilobytes, row count, and column count, which updates once the data finishes loading. The code uses React hooks (`useState`, `useEffect`) to manage asynchronous state, fetches data via D3’s `csv` function from a GitHub gist containing CSS named colors, and formats the output with `d3.csvFormat`. A loading message appears while the request is pending, and the result is rendered inside a `<pre>` element.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes