Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
MMarcus
Last edited May 22, 2022
Created on May 22, 2022
Forked from HTML Starter

This example demonstrates loading and parsing a CSV file of CSS named colors from a remote URL, displaying the file size in kilobytes, row count, and column count. The preferred method uses the `d3.csv(URL).then(...)` API to fetch and parse the data asynchronously, then calculates metrics from the resulting data object and its `columns` array. The code also includes commented-out alternatives using `fetch` and `d3.csvParse` for comparison. The sparse text output is presented in a large-format `<pre>` element.

AI-generated description

A program that loads and parses some CSV data.

MIT Licensed

Similar vizzes