Skip to main content
100%

Dataviz 2 - Loading data (Fetch)

✓ Published1🌍 Public
RRyAlpha
Last edited Nov 19, 2021
Created on Nov 19, 2021
Forked from Hello HTML

This example demonstrates how to load external data into a web page using the JavaScript `fetch` API. It retrieves a CSV file containing CSS named colors from a GitHub Gist and logs the raw text to the browser console. The code defines an asynchronous helper function `fetchText` that requests the URL and parses the response as text using `response.text()`. A commented-out alternative shows chained promises for the same operation. The visualization itself is not rendered; the example focuses solely on the data-loading step.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes