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)

c9daa36f873e4c9a9b142d46772ebb52

Loading data with react and d3

0 stars1🌍 Public
PPiotr Paszek
Last edited May 22, 2022
Created on May 22, 2022
Forked from Mouse follower

This example shows how React and D3 can be combined to load and summarize a CSV dataset. The React component uses the `useState` and `useEffect` hooks to fetch data asynchronously via `d3.csv` from a GitHub-hosted file of CSS named colors. Once loaded, the component displays the file size in kilobytes, row count, and column count using `d3.csvFormat` to calculate the byte length. While the page loads, it shows a "Loading..." message; after loading, the result is rendered as large text within an SVG-ready HTML structure.

AI-generated description

A program that loads in some data using d3 and uses react ot keep track of that data.