Skip to main content
100%

Load data with React

✓ Published1🌍 Public
Rrickyphula
Last edited Nov 11, 2021
Created on Nov 11, 2021

This example demonstrates loading and summarizing a CSV dataset from a remote URL using React and D3. The app displays the file size in kilobytes, row count, and column count once the data loads, replacing a "loading" message. It uses the React hooks `useState` and `useEffect` to fetch the data with `d3.csv`, then formats the summary using `d3.csvFormat` and a custom message module. The visualization is rendered as text via React, with the data sourced from a GitHub gist containing named CSS colors.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes