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
SSam
Last edited Apr 25, 2021
Created on Apr 25, 2021

This example demonstrates how to load and parse CSV data from a remote URL, displaying the dataset’s size in kilobytes, row count, and column count in a large `pre` element. The code uses the JavaScript `fetch` API with async/await to retrieve the text, then parses it with `d3.csvParse`. Alternatively, it shows the simpler `d3.csv` method, which combines fetching and parsing in one step. The source data is CSS named colors from a GitHub gist.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed