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)

178b5d04815c468fa040060000973cfc

Loading Data with React & D3

0 stars0🌍 Public
NNaoto Nishimura
Last edited Jan 7, 2022
Created on Jan 7, 2022
Forked from Following Circle

This example demonstrates how to load and summarize a CSV dataset within a React application, displaying the data’s size, row count, and column count as text. It uses D3’s `csv` function to fetch data from a remote GitHub gist, while React’s `useState` and `useEffect` hooks manage the loading state and trigger the asynchronous request. The rendered output updates from a “Loading...” message to the computed statistics once the data arrives, with the message formatted using `d3.csvFormat` and JavaScript string concatenation.

AI-generated description

Load data with D3 and track state with React