Skip to main content
Public

Share visualization

Loading preview…

Loading and Parsing CSV Data

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Loading and Parsing CSV Data

1
KKarenNg
Last edited Sep 5, 2019
Created on Sep 5, 2019

This example demonstrates how to load and parse CSV data using D3 v5. It displays the file size, row count, and column count of a wildlife trade dataset pulled from a GitHub gist. The primary approach uses `d3.csv`, which fetches and parses the CSV in one step, while commented-out alternatives show `fetch` with `async`/`await` combined with `d3.csvParse`. The results appear as large text in a `pre` element, providing a simple, immediate visual summary of the dataset’s basic dimensions.

AI-generated description

A program that loads and parses some CSV data.

Comments

Sign in to join the discussion.

MIT Licensed