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)

b6be107cd0df45638b57e4c20e9dedb7

Loading data with React & D3

0 stars0🌍 Public
PPABOML
Last edited Jan 14, 2022
Created on Jan 14, 2022
Forked from Mouse Follower

This example demonstrates how to load external data with D3 utilities and manage it through React state. The application fetches a CSV file containing CSS named colors from a GitHub gist using d3.csv, then displays a summary message showing the data size in kilobytes, row count, and column count. The visualization uses React hooks—useState, useEffect, and useCallback—to handle asynchronous data loading and rendering. The output is rendered as SVG-like text within a pre element, with d3.csvFormat used to calculate the formatted data length.

AI-generated description

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