Skip to main content
100%

Loading Data with Fetch

✓ Published2🌍 Public
RRichard Burd
Last edited Feb 6, 2022
Created on Jan 2, 2022
Forked from HTML Starter

This example demonstrates how to load and display data from an external CSV file using the Fetch API in plain JavaScript, without any visualization libraries. It shows three different code patterns—nested promise callbacks, an async function with a variable URL, and an async function using the `.then()` method—all logging the raw text of the CSS named colors dataset to the console. The data comes from a raw GitHub gist containing a comma-separated list of color names and values. The example focuses on data loading techniques rather than visual output.

AI-generated description

Left off exactly here: https://youtu.be/1UBraY8Z7uI?t=432

The gist file is here: https://gist.github.com/Richard-Burd

The given path is this:

<script src="https://gist.github.com/Richard-Burd/1554b4f94639c3a69f4c4b58f1ee4f3d.js"></script>

The tutorial wants s.thing like this: https://gist.githubusercontent.com/Richard-Burd/1554b4f94639c3a69f4c4b58f1ee4f3d/raw/cssNamedColors.csv

MIT Licensed

Similar vizzes