Loading Data with React & D3
This example demonstrates how to load and summarize a CSV dataset using React and D3. The visualization displays a text summary showing the data’s file size in kilobytes, row count, and column count, initially showing “Loading…” until the data arrives. The code uses React’s `useState` and `useEffect` hooks to manage data state, and D3’s `csv` function to fetch and parse the remote CSV file, followed by `d3.csvFormat` to calculate the formatted size. The data source is a gist containing CSS named colors.