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)

c2ff6796130447c18a9a58f25e7a5ecb

Fork of Loading Data with React & D3

0 stars0🌍 Public
SSalman Chowdhury
Last edited Mar 6, 2022
Created on Mar 6, 2022

This example demonstrates how to load and summarize a CSV dataset using React state and D3 utilities. The app fetches iris flower data from a remote URL via `d3.csv`, storing the parsed result with React's `useState` and `useEffect` hooks. While loading, it displays "Loading...", then renders a plain-text summary describing the data's size in kilobytes, row count, and column count using `d3.csvFormat` and the dataset's `columns` property. The visualization is minimal—a styled `<pre>` element—focusing on the integration of React's component lifecycle with D3's data-loading API.

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.