Skip to main content
100%

Loading and parsing csv data

✓ Published0🌍 Public
SSuwigya Rathore
Last edited Oct 19, 2021
Created on Oct 19, 2021
Forked from HTML Starter

This example displays basic statistics about a remote CSV file, including its size in kilobytes, row count, and column count, rendered as plain text. It loads the data using `d3.csv` from the D3 v5 library, which asynchronously fetches and parses the CSV from a GitHub gist. The parsed result is then queried for its row and column metadata using `data.length` and `data.columns.length`, and the formatted text is injected into a pre element. The code also includes a commented-out alternative using the `fetch` API and `d3.csvParse`.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes