Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Viewing a saved revision (read-only)

9f42a73d96a14367a5bf990fd4cfd2e2

Fork of Loading Data with React & D3

0 stars0🌍 Public
RRahel Gunaratne
Last edited May 11, 2021
Created on May 11, 2021

This example demonstrates how to load and display a summary of CSS named color data using React and D3. The visualization renders a plain-text message showing the dataset’s size in kilobytes, row count, and column count. Data is fetched asynchronously with D3’s `csv` method, while React’s `useState` and `useEffect` hooks manage the loading state and prevent infinite re-fetching. The final output is presented inside a `<pre>` element, initially displaying “Loading...” until the data arrives.

AI-generated description

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