Skip to main content
100%

Load data wiht react & d3

✓ Published1🌍 Public
Aaparnasj-sj
Last edited Oct 8, 2023
Created on Oct 8, 2023
Forked from EXERCISE 2

This example demonstrates how to load and summarize a CSV dataset using React and D3. It fetches a CSV file of CSS named colors via `d3.csv` and stores the parsed data in React state with the `useState` and `useEffect` hooks. Once loaded, a custom `message` utility computes the file size in kilobytes, row count, and column count using `d3.csvFormat`, displaying these statistics in a large `<pre>` element. The interface shows “Loading...” until the asynchronous data request resolves, highlighting the integration of D3’s data-loading utilities with React’s component lifecycle.

AI-generated description

Load in data with d3 utiltities , use React state to keep track of data

MIT Licensed

Similar vizzes