Skip to main content
100%

Loading and Parsing CSV Data

✓ Published1🌍 Public
Mmarouan-ben
Last edited Sep 11, 2023
Created on Sep 11, 2023

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 description
MIT Licensed

Similar vizzes