Skip to main content
100%

Loading data with d3 and react

✓ Published0🌍 Public
Nnourfahmy2003
Last edited Jul 27, 2022
Created on Jul 27, 2022
Forked from mouse follower

This example demonstrates how to load a CSV dataset and display its summary statistics as oversized text in a React application. The app fetches data from a GitHub Gist URL using the `d3.csv` method, then formats a message with file size in kilobytes, row count, and column count using `d3.csvFormat` and the data’s metadata. Rendered inside a `<pre>` element, the result updates from “loading…” to the computed statistics once the data arrives. The code uses React hooks (`useState`, `useEffect`) and the `ReactDOM.render` API with D3 v7.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes