Loading and Parsing CSV Data
✓ Published0🌍 Public
This example shows a minimal web page that fetches a CSV file of CSS named colors and reports its size and structure. The page displays the file size in kilobytes, the number of data rows, and the number of columns in large, preformatted text. The code uses the native `fetch` API to retrieve the CSV text, then parses it with `d3.csvParse` from D3 v6. It counts rows via `data.length` and columns via `data.columns.length`, updating the DOM through `textContent`. The data comes from a GitHub Gist hosted CSV file.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed