Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Load data with React

Public visualization

Viewing a saved revision (read-only)

b0838ad1eb624e4cbd705cc0bb81fc44

Load data with React

0 stars1🌍 Public
Rrickyphula
Last edited Nov 11, 2021
Created on Nov 11, 2021

This example demonstrates loading and summarizing a CSV dataset from a remote URL using React and D3. The app displays the file size in kilobytes, row count, and column count once the data loads, replacing a "loading" message. It uses the React hooks `useState` and `useEffect` to fetch the data with `d3.csv`, then formats the summary using `d3.csvFormat` and a custom message module. The visualization is rendered as text via React, with the data sourced from a GitHub gist containing named CSS colors.

AI-generated description

Smiley face implementation with React.