Skip to main content
100%

Loading and Parsing CSV data

✓ Published0🌍 Public
EEugenio2192
Last edited Jul 1, 2021
Created on Jun 29, 2021
Forked from HTML Starter

This example demonstrates the loading and parsing of CSV data by fetching a file from a GitHub gist and displaying summary statistics—file size in kilobytes, row count, and column count—in large text within an HTML `<pre>` element. It uses the Fetch API with async/await to retrieve the raw text, then parses it with `d3.csvParse` from D3 v7. The resulting data structure’s length and `columns` array are accessed to report the metrics, showcasing a minimal workflow for handling tabular data in a browser.

AI-generated description

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

See also React Starter.

  const promise = fetch(url);
  promise.then(response => {
    response.text().then(text => {
    	      	console.log(text);
    });
  });
MIT Licensed

Similar vizzes