🌍 Public
Viewing a saved revision (read-only)
05d44a950dd94cc8900a3f8daa8c5cbb
Loading Data with React & D3
This example demonstrates loading a CSV dataset of CSS named colors from a GitHub gist using D3's `csv` utility within a React application. It displays key statistics about the data—file size in kilobytes, row count, and column count—in a large text format. The app uses React state and the `useEffect` hook to fetch the data asynchronously, showing a "Loading..." message until the fetch completes. The D3 `csv` function parses the remote CSV, and `d3.csvFormat` calculates the byte size for the summary.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.