🌍 Public
Summary Statistics for Boston Crime Data
This example displays summary statistics for Boston crime data from 2020, showing the dataset’s size in kilobytes, row count, and column count in large text. It loads the CSV from a GitHub gist using `d3.csv`, then calculates the file size by measuring the formatted CSV string length and divides it by 1024. The code also includes commented-out alternatives using `fetch`, `async`/`await`, and `d3.csvParse`, demonstrating different approaches to asynchronous data loading. The visualization is minimal, rendering the final message into a `<pre>` element using standard DOM text assignment.
AI-generated descriptionLoading and calculating summary statistics for a Boston Crime dataset.
Data from: https://gist.github.com/LeahMitchell/1995469479ed07a95eabb8625b32807a
MIT Licensed
Comments
Sign in to join the discussion.