🌍 Public
Fork of Loading Data with React & D3
This example demonstrates how React and D3 can work together to load and summarize a dataset of CSS named colors. The application uses D3’s `csv` utility to fetch the remote data and React’s `useState` and `useEffect` hooks to manage the asynchronous loading state. Once the data arrives, a custom `message` function computes and displays the file size in kilobytes, the number of rows, and the number of columns using `d3.csvFormat` and array properties. A large monospaced `pre` element renders the result, with “Loading...” shown before the fetch completes.
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.