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)

9cac9c7b410049138d6c68fc05903db3

Loading Data with React & D3

0 stars0🌍 Public
Hheiltutanvidare
Last edited Mar 3, 2021
Created on Mar 3, 2021

This example demonstrates how to load and display a CSV dataset from a GitHub gist using React and D3. It shows the file size in kilobytes, row count, and column count as plain text. The code uses the `useState`, `useEffect`, and `useCallback` hooks to manage asynchronous data loading, with the `csv` function from D3 v5 fetching the data and updating React state. The `message` utility formats the summary from the parsed CSV structure.

AI-generated description

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