Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Loading and Parsing CSV Data

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed