Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published1🌍 Public
SSampras Dsouza
Last edited Jun 9, 2022
Created on Jun 9, 2022

This example displays summary statistics about a CSV dataset of CSS named colors, showing the file size in kilobytes, row count, and column count in large monospaced text. It loads and parses the data using D3 v5’s `d3.csv` function, which returns a promise that resolves with the parsed tabular data, and then computes the formatted size with `d3.csvFormat`. The code also includes commented-out alternatives using `fetch`, `async`/`await`, and `d3.csvParse`, illustrating different ways to handle asynchronous CSV loading in a web browser.

AI-generated description
MIT Licensed

Similar vizzes