Problem
Open crime data from large cities is published continuously but remains hard to use. CrimeWatch brings it into a shared warehouse to follow affected areas, detect abnormal clusters and estimate the most likely crime type per area and hour.
Data
- Crime data from Chicago, Los Angeles, New York and London
- Warehouse (09/10 to 31/10/2026): 50,078 crimes in New York, 13,519 in Chicago, 12,089 in Los Angeles, 3,777 in London
- ~500 m areas; cross-referenced with weather
- Open sources: Chicago Data Portal, LA Open Data (LAPD NIBRS), NYC Open Data (NYPD), UK Police API (central London) and Open-Meteo for weather
Approach
- Ingestion through a Kafka producer and Spark Streaming processing, orchestrated with Airflow (Docker)
- Hotspot detection with DBSCAN over 30-minute windows, published to the Kafka topic crimes.alerts
- Crime-category prediction per area and hour with XGBoost (phase 2)
- My part (phase 3): dbt modelling on Snowflake, Streamlit dashboard (map, alerts, predictions, analysis) and CI
Results
- XGBoost model: the right category is in its top-3 about 6 times out of 10 (0.62 vs 0.58 for “the area’s 3 usual categories”)
- Dashboard running on all 4 cities, with data reloaded from the warehouse
What I would improve
- Add dbt tests (uniqueness, missing values, freshness) run in CI
- Widen the gap with the baseline (0.62 vs 0.58) with additional context features