Skip to main content
100%

Loading Data with React & D3

✓ Published1🌍 Public
Ddleoenri
Last edited Apr 20, 2022
Created on Apr 19, 2022
Forked from HTML Starter

This example demonstrates how to load and display CSV data in a React component using D3's `csv` method. The app fetches a remote CSV file representing MobileDownloads data, then uses React's `useState` and `useEffect` hooks to manage the asynchronous data loading. While the data is being fetched, it shows a "Loading..." message; once loaded, it displays summary statistics including file size in kilobytes, row count, and column count, formatted with `d3.csvFormat`. The visualization uses React 18, D3 v7, and a production UMD build of React.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes