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)

52d5eaed1eae4b518b1a5a1c284dc830

Loading Data with React & D3

0 stars1🌍 Public
AAbi360
Last edited Aug 9, 2021
Created on Aug 3, 2021
Forked from Mouse Follower

This example demonstrates how to load external data in a React component using D3 utilities and display a text summary of the dataset. The application fetches a CSV file containing CSS named colors via `d3.csv`, stores the parsed result in React state with the `useState` and `useEffect` hooks, and shows a message with the file size in kilobytes, number of rows, and number of columns using a custom `message` function that relies on `d3.csvFormat`. The data is rendered as large text in an SVG-compatible HTML page.

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