Dataviz 2 - Loading data (Fetch)
✓ Published1🌍 Public
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 descriptionA bare minimum HTML page.
MIT Licensed