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 stars1🌍 Public
Aabhashdiu
Last edited Oct 5, 2022
Created on Oct 3, 2022

This example demonstrates a minimal React application that fetches and summarizes a dataset of CSS named colors. The visualization displays three key statistics about the loaded data: the approximate file size in kilobytes, the total number of rows, and the number of columns. The code uses React’s `useState` and `useEffect` hooks to manage the asynchronous loading process, while D3’s `csv` function retrieves and parses the data from a remote URL. Once loaded, the `message` helper formats the summary using D3’s `csvFormat` method, and the result is rendered inside an HTML `<pre>` element with large typography.

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