🌍 Public
Viewing a saved revision (read-only)
0580da6dcf6642559a21e9f781f6bd88
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data from a remote URL, displaying the file size, row count, and column count in large text. The code uses the Fetch API with async/await to retrieve the raw CSV text, then parses it with `d3.csvParse`. It also shows an alternative commented-out approach using `d3.csv` with promises. The dataset is CSS Named Colors, fetched from a GitHub gist, and the results are rendered into a DOM element via `textContent`.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.
See also: