Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with Fetch, Promises, Async and Await

Public visualization

Viewing a saved revision (read-only)

4760d02bfdb44b5b8e2d8d4d20f08125

Loading data with Fetch, Promises, Async and Await

0 stars1🌍 Public
AAman Singh
Last edited Mar 24, 2023
Created on Mar 24, 2023
Forked from HTML Starter

This example demonstrates loading a remote CSV file named CSSNamedColors.csv, which is hosted as a GitHub Gist. The code uses JavaScript's built-in `fetch` API along with `async` and `await` keywords to retrieve the file's text content and log it to the browser console. The process is triggered by defining a custom `fetchText` function that wraps the fetch call and returns the response as text, then chaining a `.then()` handler to process the result. The visualization focuses solely on the data-loading mechanism, without any graphical rendering or parsing of the CSV contents.

AI-generated description

A program that loads and parses some CSV data.