🌍 Public
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.
MIT Licensed
Comments
Sign in to join the discussion.