🌍 Public
Viewing a saved revision (read-only)
351e1c9a3cf345dbb98ba97af706baa8
Loading Data with React & D3
This example demonstrates how to load and summarize a CSV dataset using D3 and React. It fetches a list of CSS named colors from a GitHub gist via `d3.csv`, then stores the parsed result in React state with the `useState` and `useEffect` hooks. While the data loads, the app displays “Loading...”; once ready, it prints a text summary generated from the data, showing file size in kilobytes, row count, and column count using `d3.csvFormat` and the data’s `columns` property. The visualization is purely textual, rendered inside a `<pre>` element.
AI-generated descriptionA program that follows your mouse with a circle