Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with React & D3

Public visualization

Loading data with React & D3

0 stars1🌍 Public
NNana Kwame
Last edited Aug 21, 2023
Created on Aug 17, 2023
Forked from mouse trapper

This example demonstrates how to load a remote dataset of CSS named colors using D3’s `csv` utility, with React state managing the asynchronous fetch. The interface displays a plain-text summary reporting the file size in kilobytes, the number of rows, and the column count, refreshing once the data arrives. The code combines React’s `useState` and `useEffect` hooks, D3’s `csv` for parsing, and a custom `message` helper that formats the summary, all rendered as SVG-free `<pre>` output.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed