Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with React and D3

Public visualization

Viewing a saved revision (read-only)

566ab5e09ec24fd1b9aa45c013d3c0a8

Loading data with React and D3

0 stars0🌍 Public
EEugenio2192
Last edited Jul 1, 2021
Created on Jul 1, 2021

This example demonstrates loading a remote CSV dataset with React and D3, displaying the file size, row count, and column count as text. The `useState` and `useEffect` hooks manage asynchronous data loading, while D3’s `csv` fetches the CSS named colors data from a GitHub gist. The message is generated with `d3.csvFormat` to calculate byte size, and rendered as large text in an SVG-free `<pre>` element. React 16.9 and D3 v5 handle the data pipeline and rendering.

AI-generated description

D3 and React