🌍 Public
Viewing a saved revision (read-only)
021792be193b4668a46a556a51d94fc2
Loading data with React & D3
This example demonstrates a minimal React & D3 workflow for fetching and summarizing a remote CSV dataset. It loads the CSS named colors data from a GitHub gist using D3’s `csv` function, then stores the parsed result in React state via `useState` and `useEffect`. The rendered output is a `<pre>` element that displays a text summary—file size in kilobytes, row count, and column count—computed through the custom `message` function using `d3.csvFormat`.
AI-generated descriptionA program that oads in data using D3 utilities, and uses React state to keep track of the data.