Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

89bebc214b2e45cc85b07b3fe68b9c1f

Loading and Parsing CSV Data

0 stars0🌍 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.