Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Aditya - Data loading with Fetch, Promises, Async, Await

Public visualization

Viewing a saved revision (read-only)

6d62d819a2f94e63a176f15ad284300b

Aditya - Data loading with Fetch, Promises, Async, Await

0 stars0🌍 Public
AAditya Bhattacharya
Last edited Mar 30, 2022
Created on Mar 30, 2022
Forked from HTML Starter

This example demonstrates how to load and inspect a CSV dataset using JavaScript’s Fetch API with async/await, as well as D3’s `d3.csv` method. The page displays the file size in kilobytes, the number of rows, and the number of columns from the `cssNamedColors.csv` dataset hosted on GitHub. The code includes commented-out alternatives using Promises with `.then()` and a simple async/await pattern, highlighting different approaches to asynchronous data loading while logging the raw text to the console.

AI-generated description

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

See also React Starter.