Skip to main content
100%

Loading data with React and d3

✓ Published0🌍 Public
AAlejo Cortiñaz
Last edited Jul 12, 2022
Created on Jul 7, 2022

This example shows how to load a CSV dataset with d3 and manage it through React state. The app fetches a named colors CSV from a GitHub gist using `d3.csv` inside a `useEffect` hook, then stores the parsed data with `useState`. While loading, it displays a "Loading..." message; once the data arrives, it uses a custom `message` function to report the dataset’s column count, row count, and size in kilobytes. The visualization itself is minimal—just text rendered in a `<pre>` element via React, demonstrating data loading without any charts.

AI-generated description

A program that loads some data with d3 utilities and uses ReactState to keep track of the data

MIT Licensed

Similar vizzes