Skip to main content
100%

Loading and Parsing CSV Data

✓ Published1🌍 Public
MMichael Bergerson
Last edited Dec 22, 2020
Created on Dec 22, 2020

This example demonstrates how to load and parse CSV data, displaying a summary of the CSS Named Colors dataset that includes file size, row count, and column count. It uses `d3.csv` to asynchronously fetch the remote CSV file and parse it into a tabular structure, then formats the summary using `d3.csvFormat` and `Math.round`. The visualization appears as large text rendered in an HTML `<pre>` element. The code also includes commented alternatives using `fetch`, `async`, and `await` with `d3.csvParse`.

AI-generated description
MIT Licensed

Similar vizzes