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)

548b8ee53e674d03a98a6a585e8c45d5

Loading Data with React & D3

0 stars1🌍 Public
MMosheAron
Last edited Mar 4, 2021
Created on Mar 2, 2021
Forked from Mouse Follower

This example demonstrates how to load external data in a React application using D3 utilities, displaying dataset statistics as text. It fetches a CSV file of CSS named colors with `d3.csv`, then stores the result in React state via the `useState` and `useEffect` hooks. The app shows a summary message computed by `d3.csvFormat`, reporting the file size in kilobytes, row count, and column count. The visualization is minimal, rendering only the statistical text in a large `<pre>` element, with a loading indicator until the data arrives.

AI-generated description

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