Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
LLei Lei
Last edited Jan 30, 2022
Created on Jan 17, 2022
Forked from HTML Starter

This example demonstrates how to load and parse CSV data with D3, displaying basic metadata about the dataset. After fetching the CSV file from a GitHub gist, it computes and presents the file size in kilobytes, the total number of rows, and the column count. The visualization uses D3's `d3.csv` method to asynchronously fetch and parse the data, followed by `d3.csvFormat` to measure the raw text length. The resulting statistics are rendered as large text in an HTML `<pre>` element, with alternative commented-out approaches using `fetch`, `async`/`await`, and `d3.csvParse`.

AI-generated description

A script that loads and parses CSV data.

MIT Licensed

Similar vizzes