🌍 Public
Fork of Loading Data with React & D3
This example demonstrates a minimal data-loading workflow using React and D3. It fetches a CSV file of CSS named colors via the `csv` function from D3, stores the parsed data in React state with `useState`, and triggers the fetch inside a `useEffect` hook. While the data loads, the interface displays a "Loading..." message; once ready, it renders a summary of the dataset—its size in kilobytes, row count, and column count—formatted as a large text block. The code uses React DOM for rendering and D3’s `csvFormat` to calculate the file size.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed
Comments
Sign in to join the discussion.