Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with React & D3

Public visualization

Viewing a saved revision (read-only)

b917b31dd9634eb8870c2f2db316be42

Loading data with React & D3

0 stars0🌍 Public
YYohR
Last edited Oct 27, 2021
Created on Oct 27, 2021
Forked from Mouse Follower

This example demonstrates how to load and summarize a CSV dataset within a React application using D3. It fetches a remote file of CSS named colors and displays a brief textual report of its size in kilobytes, row count, and column count. The code uses React’s `useEffect` and `useState` hooks to trigger the asynchronous `d3.csv` request, then formats the result with `d3.csvFormat` and a custom `message` module. The output appears as large, plain text in a `<pre>` element while the data is loading.

AI-generated description