Skip to main content
100%

Loading Data with React & d3

✓ Published0🌍 Public
CChristian-SWS
Last edited Aug 23, 2023
Created on Aug 22, 2023

This example demonstrates how to load a CSV dataset from a GitHub gist and display a summary message using React state. It uses the `useState` hook to hold the fetched data and `useEffect` with an empty dependency array to call d3.csv once on component mount. The `message` function computes the number of rows, columns, and approximate file size using d3.csvFormat. The result updates a `<pre>` element, showing either loading text or the computed statistics, with React handling the rendering.

AI-generated description

A Programm that uses D3 utilities to load some data and uses React state t okeep track of the data...

MIT Licensed

Similar vizzes