Skip to main content
100%

Loading Data with React & D3

✓ Published0🌍 Public
Qqtrfx
Last edited Jun 17, 2023
Created on Jun 17, 2023
Forked from Mouse Follower

This example demonstrates how to load a CSV dataset from a remote URL and display summary statistics about it, including file size, row count, and column count. The visualization uses React state to manage the data, with the `useEffect` hook triggering the `d3.csv` utility to fetch the dataset asynchronously. Once loaded, the data is formatted using `d3.csvFormat` to calculate its size in kilobytes. The interface renders the computed statistics in a large monospace `<pre>` element, initially showing “Loading…” until the data arrives. The example pulls the CSS named colors dataset from a GitHub gist.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes