🌍 Public
Viewing a saved revision (read-only)
e3ad5abfa4e84657a32df81e06f1a788
Datavis 2020 Episode 16 - Loading Data in React
This example demonstrates how to load external data in a React application using D3 utilities, displaying file size, row count, and column count asynchronously. The app uses React hooks (`useState`, `useEffect`) to manage loading state and fetch a CSV file of CSS named colors from a GitHub gist. Once loaded, the `d3.csv` function parses the data, and `d3.csvFormat` calculates the data size in kilobytes for display. The interface shows a large text message before and after loading, with React re-rendering the output once the data arrives.
AI-generated descriptionA program that loads in some data using D3 utilities, and uses React state to keep track of the data.