🌍 Public
Viewing a saved revision (read-only)
f08ed1167b2b4e2d92eaad6a9898a5c1
Loading Data with React & D3
This example demonstrates how React and D3 can work together to load and summarize a CSV dataset. It fetches monthly data from a GitHub gist using D3’s `csv` method inside a React `useEffect` hook, then renders a text summary with `pre`. The message function from `message.js` reports the file size in kilobytes, the row count, and the column count using `d3.csvFormat` and the data’s `columns` property. While the data loads, the interface displays "loading" as a placeholder.
AI-generated descriptionA program loading Data with Reat & D3.