Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Summary Statistics for Boston Crime Data

Public visualization

Viewing a saved revision (read-only)

7eb653081a8640818b29625803b24227

Summary Statistics for Boston Crime Data

0 stars1🌍 Public
LLeah Mitchell
Last edited Sep 27, 2021
Created on Sep 6, 2021

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 description

Loading and calculating summary statistics for a Boston Crime dataset.

Data from: https://gist.github.com/LeahMitchell/1995469479ed07a95eabb8625b32807a