Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React and D3 TMP

Public visualization

Viewing a saved revision (read-only)

9f761da7e9f14f7f8addabee643bed71

Loading Data with React and D3 TMP

0 stars0🌍 Public
AAndy Chang
Last edited Sep 27, 2022
Created on Sep 27, 2022

This example demonstrates how to load external data into a React application using D3 utilities. It fetches a CSV file containing named CSS colors from a GitHub gist, then displays summary statistics about the dataset, including the number of rows, columns, and file size in kilobytes. The code uses `d3.csv` to parse the remote CSV, `d3.csvFormat` to calculate its size, and React’s `root` DOM element to render the output via plain text. D3 v7 and React are integrated without additional state management.

AI-generated description

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

See also React Starter.