Skip to main content
100%

Loading and Parsin DSV Data

✓ Published0🌍 Public
JJacual
Last edited Mar 2, 2022
Created on Feb 25, 2022
Forked from HTML Starter

This example demonstrates how to load and parse DSV data in D3, displaying a summary of a CSV file’s size, column count, and row count in large text. It uses `d3.csv` to fetch and parse the data from a GitHub gist, relying on the modern `fetch` API under the hood. The code also includes commented alternatives using `fetchText` with `async`/`await` and `d3.csvParse`, showing multiple approaches to the same task. The result is formatted with `d3.csvFormat` and `Math.round` to compute the file size in kilobytes.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes