guest@barlow.build: ~/projects/nyc-arrest-data-map
← cd .. (all projects)
guest@barlow.build:~/projects/nyc-arrest-data-map$ cat README.md
./web-apps

NYC arrest data map

A university project for LCOD 2123 Internet Geographies: open NYPD arrest records turned into one interactive map, because a table of rows can only show the numbers.

## The brief # what the client needed

The assignment was to map a public dataset instead of tabulating it. Each arrest record carries a location, and where those locations fall is the part a spreadsheet cannot show. I worked from the first 1,000 rows, and had to make them readable two ways: as points you can zoom into, and as counts per precinct.

## What I built # the solution

The analysis came first: in a Jupyter notebook, a page that mixes code with its output, I counted arrests per police precinct with pandas, a Python library for tables of data, and broke each count down by race and sex. I saved those results into the page’s own code, so the page loads with no server behind it. The page is one screen of HTML, CSS and JavaScript, with Leaflet, a map library, drawing the 77 precinct boundaries. Hover a precinct and a panel shows its total and the breakdown; the 1,000 arrests sit on top as dots that bunch together at city scale and split into single arrests as you zoom in. Clicking a precinct zooms to it.

  • Arrest totals for each of the 77 precincts, counted once and saved into the page
  • Arrest dots that bunch up at city scale and split apart as you zoom in
  • Hover a precinct for its total, broken down by race and sex
  • Click a precinct to zoom to it
project.json
client
University coursework
role
Analysis and build
year
2024
delivered
About four weeks
live
https://mbarlowsg.github.io/Arrest-Data-2/
repo
https://github.com/Mbarlowsg/Arrest-Data-2
stack
  • HTML
  • CSS
  • JavaScript
  • Leaflet
  • Python
  • pandas

## Screenshots # ls ./screenshots

fig. 01 / 03 The city view: 1,000 arrests bunched into counts, with every precinct boundary drawn

## The result # what changed for the client

Marked an A. It also went further than my first attempt at the coursework, which listed precinct-level analysis as work still to do; this one is built around it. The page is served from GitHub Pages with no server, and the numbers are what those 1,000 rows contain, not a measure of the city.

Have a project like this in mind?
Tell me about it and I’ll reply with questions and a rough plan.
[ say hello ]
guest@barlow.build:~/projects/nyc-arrest-data-map$

Change Colorscheme

Pick a scheme and the site re-colours immediately. Your choice is remembered on this device.

Dark
Light

Change Font

Pick a font and a text size and the site re-types immediately. Your choice is remembered on this device.

Font
Text size