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)

1b5fb9c1fa69487eb57d49c1c603f0e6

Loading Data with React & D3

0 stars1🌍 Public
Ddiogomirandabarbosa25@gmail.com
Last edited Jul 31, 2024
Created on Jul 28, 2024
Forked from Mouse Follower

This example demonstrates how to load and summarize a CSV dataset using D3 and React. It fetches a list of CSS named colors from a GitHub gist via `d3.csv`, then stores the parsed result in React state with the `useState` and `useEffect` hooks. While the data loads, the app displays “Loading...”; once ready, it prints a text summary generated from the data, showing file size in kilobytes, row count, and column count using `d3.csvFormat` and the data’s `columns` property. The visualization is purely textual, rendered inside a `<pre>` element.

AI-generated description

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