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)

ded1b9779a584611aa2813a6650113a8

Loading Data with React and D3

0 stars1🌍 Public
LLisa Wagner
Last edited Aug 24, 2021
Created on Aug 24, 2021
Forked from Mouse Follower

This example demonstrates how to load external data in a React application using D3 utilities. It fetches a CSV file containing CSS named colors via `d3.csv`, stores the result in React state with `useState` and `useEffect`, and displays a summary of the loaded data as text. The summary includes file size in kilobytes, row count, and column count, computed using `d3.csvFormat`. While loading, the view shows a “Loading…” message, and the data is rendered as plain text in an SVG-free layout.

AI-generated description

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