Skip to main content
100%

Load Data in React

✓ Published1🌍 Public
Aahora
Last edited Jul 22, 2022
Created on Jul 22, 2022
Forked from Mouth Follower

This example demonstrates loading a CSV dataset in a React application and displaying its metadata, including file size in kilobytes and row count. The visualization uses React hooks like `useState` and `useEffect` to asynchronously fetch the data with `d3.csv` from a GitHub gist containing CSS named colors. The result is rendered as large text via a `<pre>` element, showing a loading message until the data arrives. The code integrates React 18, D3 v7, and a custom `message` function that formats the output using `d3.csvFormat` and `Math.round`.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes