Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
CCees Klap
Last edited Feb 27, 2021
Created on Feb 27, 2021

This example demonstrates how to load and parse a CSV file using D3’s `d3.csv` method, displaying summary statistics about the dataset in a large `<pre>` element. It fetches a remote CSV of CSS named colors from a GitHub gist, then reports the file size in kilobytes, the number of rows, and the number of columns. The code uses `d3.csv` to fetch and parse the data, `d3.csvFormat` to measure the formatted output, and `d3.csv`’s built-in promise handling to access the parsed array and its columns property.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes