Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

loading and parsing CSV data 2

Public visualization

loading and parsing CSV data 2

0 stars0🌍 Public
SSamuele Greco
Last edited Feb 4, 2022
Created on Feb 4, 2022

This example demonstrates the basic pattern of loading and parsing a CSV file in D3, displaying the number of rows, columns, and approximate file size in kilobytes as plain text on a large-format `<pre>` element. The code fetches a remote CSV file from a GitHub gist using `d3.csv`, then chains a `.then` callback to process the parsed data. It reports `data.length` for rows, `data.columns.length` for columns, and measures the output of `d3.csvFormat(data)` to estimate the original data size, updating the DOM via `textContent`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed