🌍 Public
Viewing a saved revision (read-only)
ded1b9779a584611aa2813a6650113a8
Loading Data with React and D3
This example demonstrates how to load external data in a React application using D3 utilities. It fetches a CSV file containing CSS named colors via `d3.csv`, stores the result in React state with `useState` and `useEffect`, and displays a summary of the loaded data as text. The summary includes file size in kilobytes, row count, and column count, computed using `d3.csvFormat`. While loading, the view shows a “Loading…” message, and the data is rendered as plain text in an SVG-free layout.
AI-generated descriptionA program that loads in some data about CSS named colours using D3 utilities, and uses React state to keep track of that data.