🌍 Public
Viewing a saved revision (read-only)
a12805edf55e4e4db0daa015d42f8c7b
loading data with react and d3
This example demonstrates how to load and summarize external CSV data within a React application using D3.js. The visualization presents a plain-text summary of the dataset’s size, row count, and column count, displayed in a large `<pre>` element. The code uses React’s `useState` and `useEffect` hooks to fetch the CSV from a GitHub gist via `d3.csv`, then formats the summary with `d3.csvFormat`. The `message.js` module computes the file size in kilobytes and counts rows and columns, while `ReactDOM.render` mounts the component to an SVG-rendered page.
AI-generated descriptionprogram that loads in some data using d3