Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with react and D3

Public visualization

Viewing a saved revision (read-only)

010ee92be53d401da0d0b9d1b839df3c

Loading data with react and D3

0 stars1🌍 Public
KKIRRAN P L
Last edited Dec 2, 2023
Created on Dec 2, 2023
Forked from Mouse Follower

This example demonstrates how to load external CSV data using D3 utilities within a React application. It fetches a dataset of CSS named colors from a GitHub gist and displays summary statistics about the data, including file size in kilobytes, row count, and column count. The React `useState` and `useEffect` hooks manage the asynchronous data loading, while `d3.csv` and `d3.csvFormat` handle parsing and formatting. The result is rendered as SVG text showing either a loading message or the computed data metrics.

AI-generated description

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