Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
MMorgan
Last edited Dec 14, 2024
Created on Dec 14, 2024

This example demonstrates loading a CSV dataset of CSS named colors from a remote URL and displaying a concise summary of its contents using React state management. The app initializes with a “Loading...” message, then uses D3’s `csv` utility inside a `useEffect` hook to fetch the data, which is stored via `useState`. Once loaded, the `message` function computes the file size, row count, and column count using `d3.csvFormat` and string concatenation, rendering the result in a large `<pre>` element. The visualization relies on React’s component lifecycle and D3’s data-loading API, without any graphical charts.

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.

Comments

Sign in to join the discussion.

MIT Licensed