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)

4beea0990a9d425e8a1811c984556a24

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
SSarah Elkeurti
Last edited Apr 3, 2022
Created on Apr 3, 2022

This example demonstrates the fundamental process of loading and parsing CSV data in a web visualization context, displaying a summary message that reports the data size, row count, and column count. The visualization loads CSS Named Colors data from a remote CSV file using D3 v5’s `d3.csv` method, which returns a promise and automatically parses the comma-separated values into an array of objects. The code then calculates the formatted data size in kilobytes via `d3.csvFormat` and reads `data.length` and `data.columns.length` to extract the row and column counts. The message-container element displays the results in a large font, showcasing the integration of D3’s CSV utilities with simple DOM manipulation.

AI-generated description