Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 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

MIT Licensed

Similar vizzes