Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
SSophia Cofone
Last edited May 20, 2022
Created on May 19, 2022
Forked from HTML Starter

This example demonstrates how to load and parse CSV data by fetching a remote file from GitHub Gist and displaying its basic characteristics—file size in kilobytes, row count, and column count—as large text in the browser. It uses d3.csv to asynchronously fetch and parse the data, then formats the result with d3.csvFormat to calculate size. Alternative approaches using fetch, async/await, and d3.csvParse are commented out for comparison. The code relies on D3 v7 and a minimal HTML structure with a pre element for output.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes