Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Load data with react

Public visualization

Viewing a saved revision (read-only)

8de27849704b4025a01ec18d671f4962

Load data with react

0 stars2🌍 Public
Ssxtnxy
Last edited Dec 29, 2021
Created on Dec 22, 2021
Forked from mouse movement

This example demonstrates loading a CSV file in a React component and displaying basic statistics about the dataset. It uses the D3 `csv` function to fetch data from a GitHub Gist containing named CSS colors, then shows the file size in kilobytes and the row count. The React hooks `useState` and `useEffect` manage the asynchronous data loading, and the `message.js` module formats the output using `d3.csvFormat`. While data is being fetched, the interface displays a "Loading..." message.

AI-generated description

Making a smiley face with React and D3