Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
Pputhalalitha
Last edited Apr 29, 2021
Created on Apr 27, 2021
Forked from Hello HTML

This example demonstrates how to load and parse a remote CSV file using D3’s `d3.csv` method, which returns a promise that resolves into an array of objects. The code counts the dataset’s size in kilobytes via `d3.csvFormat`, along with its number of rows and columns, and displays these statistics as large text in a `pre` element. The data originates from a GitHub gist containing named CSS colors. A commented-out alternative shows parsing via the Fetch API and `d3.csvParse`.

AI-generated description

A program that loads and parses some CSV data

A bare minimum HTML page.

MIT Licensed

Similar vizzes