Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React and D3

Public visualization

Viewing a saved revision (read-only)

6d62190cf27f481192380a403bfa4a3b

Fork of Loading Data with React and D3

0 stars1🌍 Public
AAlexalim28
Last edited Jul 30, 2021
Created on Jul 30, 2021

This example demonstrates the use of D3 utilities and React state to load and summarize a dataset of CSS named colors. It shows both a loading message and a three-line summary of the data: size in kilobytes, number of rows, and number of columns. The code uses React's `useState`, `useEffect`, and `d3.csv` to fetch the remote CSV file, then formats it with `d3.csvFormat` within a custom `message` function. The React application renders the text output inside a `<pre>` element.

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 data.