Skip to main content
100%

Dataviz 4 - Loading data in React

✓ Published0🌍 Public
RRyAlpha
Last edited Nov 20, 2021
Created on Nov 20, 2021

This example demonstrates loading a CSV dataset in a React application and displaying summary statistics as plain text. The interface shows a loading message until the data arrives, then displays the file size in kilobytes, row count, and column count. It uses the `useState` and `useEffect` hooks to trigger a async `csv` call from d3.v5, which fetches a gist containing CSS named colors. The `message.js` module formats the result using `d3.csvFormat` to calculate the data size. Rendering is handled by ReactDOM into a `<pre>` element.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes