Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

8c59341f6baa47f683323a586c85f630

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
Kkartheekgurijala2023@gmail.com
Last edited Mar 7, 2024
Created on Mar 7, 2024

This example demonstrates how to load and parse CSV data from a remote URL, displaying the file size, row count, and column count in a web page. It uses the D3.js library’s `d3.csv` method to fetch and parse the data asynchronously, then formats the result with `d3.csvFormat` to calculate the byte size. The code also includes commented-out alternatives using the Fetch API with `async`/`await` and a nested promise chain, illustrating different approaches to handling asynchronous data loading. The data source is a CSV file containing CSS named colors, hosted as a GitHub gist.

AI-generated description