Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React & D3

Public visualization

Loading Data with React & D3

0 stars0🌍 Public
BBjoernujjwb
Last edited Jan 2, 2023
Created on Jan 2, 2023

This example demonstrates loading CSS named colors data from a GitHub Gist using D3’s `csv` utility, with React managing the asynchronous state via `useState` and `useEffect`. While fetching, the app displays a “Loading…” message; once the data arrives, it renders a summary showing the file size in kilobytes (computed with `d3.csvFormat`), row count, and column count. The visualization is purely textual, using React’s `message` helper and a styled `<pre>` element, with no graphical charts or custom rendering involved.

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