Skip to main content
100%

Loading and parsing csv data

✓ Published0🌍 Public
SSkye Chen
Last edited Jul 9, 2021
Created on Jul 5, 2021
Forked from Hello HTML

This example demonstrates how to load and parse CSV data using D3 v7, displaying the file size, row count, and column count as large text on a minimal HTML page. It fetches a remote CSV file containing CSS named colors via `d3.csv`, which returns a parsed array of objects. The code then formats the data back to CSV with `d3.csvFormat` to calculate its size in kilobytes, and logs the full dataset to the console. The page uses a simple `<pre>` element and styling to present the summary. The implementation relies on D3’s built-in promise-based loading, with commented-out alternatives using `fetch` and manual text parsing.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes