Scraper used for recording changes to Portland jail database
// readme
Multnomah County Jail Crawler
Purpose
Crawl through bookings of PDX Jail Database for data analysis and data transparency purposes. Update data files with scheduled jobs courtesy of GitHub actions.
- Visit Multnomah County Online Inmate Data website: use URL for all inmates in custody: Link
- Scrape inmate names and booking dates and update
csvs/inmate_bookings.csvfile - Visit each inmate link and update
csvs/inmate_details.csvwith inmate details and total amounts for each type of charge against them - Update
csvs/inmate_charges.csvwith list of charges for all inmates - Update JSON files in
countsfolder with counts of each category daily
Scraper Details
- Located at
inmates_spider/inmates_spider/spiders/inmates.py - Generate Dataframe of inmates and booking dates and update
csvs/inmate_bookings.csv, sort by descending order of booking dates - Follow each inmate’s URL and generate metadata for each inmate, update
inmates_chargesMongoDB database with charge totals data
Using
- BeautifulSoup
- Pandas
- GitHub Actions (for cron job running scraper)
- MongoDB (using pymongo Python package)
##…