Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
FFonda Irena Santoso
Last edited Apr 20, 2021
Created on Apr 20, 2021
Forked from HTML Starter

This example shows a minimal web page that fetches a CSV file of CSS named colors and reports its size and structure. The page displays the file size in kilobytes, the number of data rows, and the number of columns in large, preformatted text. The code uses the native `fetch` API to retrieve the CSV text, then parses it with `d3.csvParse` from D3 v6. It counts rows via `data.length` and columns via `data.columns.length`, updating the DOM through `textContent`. The data comes from a GitHub Gist hosted CSV file.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes