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)

3aa3d4505c1049529b5d4d3961034e5f

Fork of Loading Data with React & D3

0 stars0🌍 Public
TTsaikkari
Last edited Jul 26, 2021
Created on Jul 26, 2021

This example shows a React application that loads a CSV file of CSS named colors and displays a summary of the dataset. The interface presents a large-text message reporting the file size in kilobytes, the number of data rows, and the number of columns. The app uses React’s `useState` and `useEffect` hooks to manage the asynchronous data loading, with D3’s `csv` function fetching the remote CSV file. Once the data is retrieved, the custom `message` module calculates the byte length of the formatted data using `d3.csvFormat`.

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.