Loading and Parsing CSV Data
✓ Published1🌍 Public
This example demonstrates loading and parsing CSV data, displaying a message that reports the file size in kilobytes, the row count, and the column count of the dataset. The code uses D3 v5’s `d3.csv` function to fetch a remote CSV file containing CSS named colors from a GitHub gist, then applies `d3.csvFormat` to compute the size and accesses the parsed data’s length and `columns` property. Comments in the code also illustrate alternative approaches using `fetch`, `async`/`await`, and `d3.csvParse` for manual text handling.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.
See also:
MIT Licensed