🌍 Public
Viewing a saved revision (read-only)
a7b9f01a32cf4f37a34a7e75c6b534f2
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data using D3.js, displaying the file size, row count, and column count of the dataset. It uses `d3.csv` to fetch and parse the local `beijing.csv` file, which contains air quality measurements. The parsed data is then processed with `d3.csvFormat` to calculate the size, while `data.length` and `data.columns.length` provide the row and column counts. The result is displayed as large text in a `<pre>` element, highlighting the simplicity of D3’s data-loading API. An alternative approach using `fetch` and `d3.csvParse` is also included as commented code.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.