🌍 Public
Viewing a saved revision (read-only)
5b0b0021fd4b4f759ea1342ae657b02e
Loading and Parsing csv Data
This example demonstrates loading and parsing a CSV file with D3 v7, displaying summary statistics about the dataset in large text. It fetches a remote CSV containing CSS named colors using the `d3.csv` method, which returns a promise that resolves to parsed data. The code then computes the formatted CSV size in kilobytes, counts the number of rows and columns, and renders these values to a `<pre>` element. Commented-out alternatives show the same process using `fetch`, `async/await`, and `d3.csvParse`.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.