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)

081e9cdf61304839a2a6933614d98346

Loading Data with React & D3

0 stars1🌍 Public
Cclebas
Last edited Apr 6, 2021
Created on Apr 5, 2021

This example demonstrates how to load and display data in a React application using D3. It fetches a CSV file containing CSS named colors from a GitHub gist, then shows a summary message with the file size in kilobytes, row count, and column count. The code uses React hooks (`useState`, `useEffect`) to manage asynchronous data loading, and D3’s `csv` method to parse the remote file. The final visualization is a simple text output rendered via a `<pre>` element, with D3’s `csvFormat` used to compute the data size.

AI-generated description

Chargement de données avec React.