Skip to main content
100%

Loading data for react

✓ Published0🌍 Public
Jjoneftali
Last edited Sep 18, 2023
Created on Sep 18, 2023
Forked from Mouse follower

This example demonstrates how to load CSV data into a React application using D3 utilities, showing the dataset’s column count, row count, and size in kilobytes. The visualization renders a simple text message via React state, which is initially null and then populated asynchronously after the data fetches. It uses `d3.csv` to parse the external gist-hosted CSS named colors dataset, `useState` and `useEffect` for state management, and `d3.csvFormat` to calculate the data size. The ReactDOM render updates the display once the data arrives.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes