🌍 Public
Viewing a saved revision (read-only)
08d78289fe2e49718fb6ab2cdcbd8a20
Loading Data with React & D3
This example demonstrates loading external CSV data with D3 and managing it through React state. It fetches a CSS named colors dataset via `d3.csv` and displays its file size, row count, and column count using the imported `message` function. The `useState` and `useEffect` hooks handle asynchronous data loading, showing a simple text loading message before the dataset summary appears. The rendered output is plain text within a `<pre>` element, with D3’s `csvFormat` used for size calculation.
AI-generated descriptionA program that loads some data with D3 and uses React state to keep trakc of the data