Skip to main content
100%

Loading data with React and & D3

✓ Published1🌍 Public
LLewis Ward
Last edited Jun 22, 2021
Created on Jun 22, 2021
Forked from Mouse Follower

This example demonstrates loading a CSV dataset and displaying summary statistics using React state and D3 utilities. The app fetches CSS named colors from a remote URL via `d3.csv`, stores the parsed data in React state with the `useState` hook, and triggers the asynchronous load inside `useEffect`. Once loaded, the `d3.csvFormat` function calculates the data’s size in kilobytes, while the row and column counts come from `data.length` and `data.columns`, respectively, with the message rendered as large monospace text. The visualization shows the raw file’s footprint, row count, and column count as a simple text output.

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