🌍 Public
Viewing a saved revision (read-only)
97cec6c4802340199a9376551bcff1cd
Fork of Loading and Parsing CSV Data
This example demonstrates a minimal interface that summarizes a CSV file’s key statistics: its size in kilobytes, the number of rows, and the number of columns. It fetches a remote dataset of CSS named colors from a GitHub gist using the `d3.csv` method, which returns a promise that resolves to a parsed data table. The code then calculates the metrics using `d3.csvFormat` and the data array’s length and `columns` property. The final message is rendered as oversized text inside a `<pre>` element, with an alternative commented-out approach using `fetch`, `async`, and `await` for comparison.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.
See also: