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)

3b022589983c4f95976255394ddcd705

Loading data with React & D3.

0 stars1🌍 Public
IIlia Katkovnik
Last edited Mar 15, 2021
Created on Mar 15, 2021

This example demonstrates how to load and summarize CSV data in a React application using D3. It shows a text display that reports the dataset’s size in kilobytes, row count, and column count. The code uses `d3.csv` to fetch the data from a GitHub gist, React’s `useState` and `useEffect` hooks to manage state, and `d3.csvFormat` to calculate the data size. The visualization is minimal, presenting the summary as a large preformatted text element.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.