Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
AAchilleasTyrnenopoulos
Last edited Nov 13, 2021
Created on Nov 13, 2021
Forked from HTML Starter

This example demonstrates how to fetch and parse a CSV file from a remote URL using the Fetch API and D3 v7’s `d3.csvParse` method. It displays the parsed dataset’s total row count, file size in kilobytes, and column names in a large `<pre>` element. The data source is a GitHub Gist containing a list of CSS named colors. The code defines an asynchronous `fetchText` function to retrieve the raw text before parsing it into a JavaScript array of objects.

AI-generated description
MIT Licensed

Similar vizzes