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)

fd77c2dbde85417eb7fc33a016d6dc79

Fork of Loading Data with React and d3

0 stars1🌍 Public
Aafcchilders
Last edited Sep 23, 2022
Created on Jan 11, 2022

This example demonstrates a React component that loads CSS color data from an external CSV file and displays a short summary of its contents. The interface shows a loading message while the data is being fetched, then renders statistics including the file size in kilobytes, the number of rows, and the number of columns. The code uses React hooks like `useState`, `useEffect`, and `useCallback` to manage the data-fetching lifecycle, with the `csv` function from d3.v7 retrieving the dataset from a GitHub gist. The `message` utility formats the summary using `d3.csvFormat` to calculate file size.

AI-generated description

A program that loads in some data about CSS colors