Skip to main content
100%

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

✓ Published0🌍 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.

MIT Licensed

Similar vizzes