All projects

UMass Amherst, DACSS 758 · 2026

Campus Safety Alerts, Ten Universities

A scraper that builds one comparable dataset out of ten universities that all publish their crime alerts differently. 519 documents, HTML and PDF, with full provenance on every row.

Context
UMass Amherst, DACSS 758
Year
2026
Method
Python

Every university publishes safety notices its own way, so a single generic crawler does not work. I wrote a dedicated scraper per institution: ASU, Ohio State, Penn State, UC Berkeley, UMass Amherst, UNC Chapel Hill, UT Austin, UW Madison, University of Florida and University of Washington.

The output is 519 documents. 473 individual alert notices, 32 from alert feeds, 11 annual security reports and 3 crime logs. 506 came from HTML and 13 out of PDFs through pdfminer. Not every campus keeps a public archive, so where one does not exist the scraper falls back to the annual security and fire safety report instead, and a record_family field marks which is which. Being able to separate those later is the difference between a dataset and a pile.

The engineering matters more than it sounds. Retry logic on transient failures, throttling between pages so I am not hammering a university's server, and cloudscraper as a fallback for the campuses that answer a normal request with 403. Every row carries the archive URL, the source URL, a content hash and a scrape timestamp, so any figure taken from this can be traced back to the page it came from and checked for drift.

What the scraper collected, by record family. Counts are from university_incident_reports.csv.
Record familyDocuments
Alert notices473
Alert feeds32
Annual security reports11
Crime logs3

Tools & methods

  • Python
  • BeautifulSoup
  • pdfminer.six
  • cloudscraper
  • requests