Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data: React + d3

Public visualization

Viewing a saved revision (read-only)

b4d3e120041b4bd687d87f6f0c2c1d79

Loading Data: React + d3

0 stars0🌍 Public
Zzeeeeem
Last edited Apr 18, 2022
Created on Apr 17, 2022
Forked from Hello VizHub

This example demonstrates how to combine React state with D3 utilities to load and display metadata about a dataset. The app uses `d3.csv` to fetch a CSV file containing CSS named colors, then stores the parsed data in React's `useState` hook. While loading, it displays the word "Loading"; once the data arrives, it shows the file size in kilobytes, row count, and column count. The code leverages React hooks like `useEffect` and `useCallback`, along with D3's `csvFormat` to calculate the data size.

AI-generated description

a program that loads in some data using D3 utiliteis , and uses react state to keep track of the data.