Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React & D3

Public visualization

Viewing a saved revision (read-only)

e88fb2db81ad41b488de502898a78618

Loading Data with React & D3

0 stars0🌍 Public
Lluispee
Last edited Mar 26, 2021
Created on Mar 26, 2021
Forked from Mouse Follower

This example demonstrates loading external CSV data with D3 and managing it through React state. It fetches a CSS named colors dataset via `d3.csv` and displays its file size, row count, and column count using the imported `message` function. The `useState` and `useEffect` hooks handle asynchronous data loading, showing a simple text loading message before the dataset summary appears. The rendered output is plain text within a `<pre>` element, with D3’s `csvFormat` used for size calculation.

AI-generated description

A program that loads some data with D3 and uses React state to keep trakc of the data