Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ep16 Load data in React

Public visualization

Viewing a saved revision (read-only)

edc3da70ed1b4fad9397c280c3a1a1ad

ep16 Load data in React

0 stars1🌍 Public
GGordon Yang
Last edited Apr 7, 2021
Created on Apr 7, 2021

This example demonstrates how to load and display a summary of a CSV dataset within a React application. The app fetches a CSV file of CSS named colors from a GitHub gist using the `d3.csv` function, then presents the file size in kilobytes, row count, and column count after the data loads. It uses React’s `useState` and `useEffect` hooks to manage the asynchronous data fetch and render the loading state. The visualization relies on React and ReactDOM, while D3 v6 handles CSV parsing and formatting.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.