🌍 Public
Fork of Loading Data with React & D3
This example shows a React application that loads a CSV file of CSS named colors and displays a summary of the dataset. The interface presents a large-text message reporting the file size in kilobytes, the number of data rows, and the number of columns. The app uses React’s `useState` and `useEffect` hooks to manage the asynchronous data loading, with D3’s `csv` function fetching the remote CSV file. Once the data is retrieved, the custom `message` module calculates the byte length of the formatted data using `d3.csvFormat`.
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.