Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
MMarta
Last edited Feb 5, 2023
Created on Feb 5, 2023

This example demonstrates how to load CSV data from a remote URL using D3’s `csv` utility within a React component. The React `useState` hook stores the fetched data, while `useEffect` triggers the asynchronous loading. The app displays a text summary of the dataset, including its size in kilobytes, row count, and column count, calculated with `d3.csvFormat`. The visible output is a simple `<pre>` element that shows either "Loading..." or the computed statistics, with styling from the linked CSS.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed