🌍 Public
Viewing a saved revision (read-only)
0a1968b450db40a98d900c15a7cb5f12
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data with D3, displaying basic metadata about the dataset. After fetching the CSV file from a GitHub gist, it computes and presents the file size in kilobytes, the total number of rows, and the column count. The visualization uses D3's `d3.csv` method to asynchronously fetch and parse the data, followed by `d3.csvFormat` to measure the raw text length. The resulting statistics are rendered as large text in an HTML `<pre>` element, with alternative commented-out approaches using `fetch`, `async`/`await`, and `d3.csvParse`.
AI-generated descriptionA script that loads and parses CSV data.