Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published1🌍 Public
Sseanmdalrymple@protonmail.com
Last edited Feb 9, 2025
Created on Feb 9, 2025

This example demonstrates the basics of loading and parsing CSV data, displaying the file size, row count, and column count of a dataset of CSS named colors. It uses D3 v5’s `d3.csv()` method, which returns a promise, to fetch the data from a GitHub gist. The code then formats the statistics using `d3.csvFormat()` and `data.columns`, injecting the results into an HTML `<pre>` element. Commented-out alternatives illustrate the same process using `fetch()` with async/await and `d3.csvParse()`.

AI-generated description
MIT Licensed

Similar vizzes