Skip to main content
Public

Share visualization

Loading preview…

Boston Crime Analysis CSV Data - Loading and Parsing

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Boston Crime Analysis CSV Data - Loading and Parsing

0
JJosvin John
Last edited Sep 10, 2020
Created on Sep 10, 2020

This example displays summary statistics from a Boston crime CSV dataset, showing the file size in kilobytes, total row count, and number of columns. It loads the remote CSV using `d3.csv` and parses it asynchronously with a Promise. The code also demonstrates alternative approaches using `fetch`, `async/await`, and `d3.csvParse`, though the active path relies on `d3.csvFormat` to compute text length for the size estimate. Results appear in a large preformatted text element.

AI-generated description

A program that loads and parses CSV data: Boston Crime Analysis.

Possible Tasks

  • Number of crimes per category
  • Major crimes in Boston
  • Major crimes in Boston per month
  • Crime count on each year/month/day/hour
  • Top 10 crime count on each street
  • Crime count per category for each year/month/day

Comments

Sign in to join the discussion.

MIT Licensed