Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
KKarenNg
Last edited Sep 5, 2019
Created on Sep 5, 2019

This example demonstrates how to load and parse CSV data using D3 v5, displaying file size, row count, and column count in a large pre-formatted text element. The code uses `d3.csv()` to fetch and parse the dataset from a GitHub-hosted CSV file containing NYC social media usage data, then formats the statistics with `d3.csvFormat()` to calculate kilobyte size. An alternative commented-out approach uses the Fetch API with `async`/`await` and `d3.csvParse()` for manual parsing. The example concisely shows the core workflow of retrieving and inspecting tabular data in a browser environment.

AI-generated description

A program that loads and parses some CSV data.

MIT Licensed

Similar vizzes