🌍 Public
Viewing a saved revision (read-only)
7e2ba1ce038a4e40889d744595eac80d
Loading Data with React & D3
This example demonstrates how to load and summarize a CSV dataset in a React application using D3, displaying the file size, row count, and column count as text. The visualization relies on React's `useState` hook to manage data asynchronously, fetching the remote dataset via `d3.csv` and formatting the summary with `d3.csvFormat`. Initially, the page shows “loading” until the data arrives. The output is rendered as SVG-less HTML text via ReactDOM, with styling set globally in the document structure. The data source is a Gist-hosted CSV of named colors.
AI-generated descriptionHalf way towards a smiley face.