Forecasting critical food violations at restaurants using open data
summary
Prototype predicts critical restaurant violations using Python with scraped DC inspection pages (selenium), Yelp, Google Places, Forecast IO and Cclickfix, ingested via pandas into SQLite and modeled with scikit-learn pipelines and custom transformers. Dataset ~1,400 inspections suffers heavy class imbalance; best classifiers yield AUC 0.56 (near coin flip). Reordering inspections by model confidence on a 3‑month holdout finds 11% more violations about 10 days earlier. No city integration, limited historical coverage, and blocking during scraping constrain performance.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:11Project motivation
- 3:39Problem framing
- 5:26Data sources
- 9:59Data wrangling
- 12:32Model selection
- 14:19Class imbalance
- 15:42Reordering inspections
- 16:46Future improvements
- 17:31Advice for novices
- 18:12Q&A
- 18:55Scikit-learn pipelines
- 21:43Evaluating predictions
- 23:28Feature selection
- 25:15Closing remarks
related talks
01h 29mImproving Open Data Quality using Python
01h 23mA Hands-On Introduction to Your First Data Science Project
43mPython at City Scale
22mCOVID-19: Data Science & Expertise
40mMachine Learning over Small Data: generating new variables with predictive power
41mAnalysing and predicting inner-city parking space occupancy
39mDiscover your latent food graph with this 1...
35mDesigning for Impact in Civic Data Science
