A big data processing system for analyzing Los Angeles crime data, implementing a data lake architecture with both batch and stream processing pipelines. This project is made as part of a college course.
-
Historical Dataset I (2010-2019): Crime Data from 2010 to 2019
- File:
crime_data.csv
- File:
-
Historical Dataset II (2020-Present): Crime Data from 2020 to Present
- File:
crime_data_2020_to_present.csv
- File:
- Real-time 911 Calls: Simulated emergency call stream
- Generated by:
Kafka/producer.py - Purpose: Simulating real-time stream processing and operational analytics
- Generated by:
The system implements a complete data lake architecture with three logical stacks:
- Batch Processing Stack: MongoDB โ Spark โ Airflow orchestrates PySpark jobs
- Stream Processing Stack: Kafka producer โ Java Kafka Streams processor โ MongoDB
- Analytics Stack: Metabase for visualization and dashboards
- What area is the most risky?
- In which area were the most cases resolved?
- What is the risk distribution for areas?
- What are the reporting speeds of cases?
- How long did each area take to respond on average?
- What is the relationship between risk and crime density?
- What year had the most crimes committed?
- How is risk changing over the years?
- What are the latest trends for crime increase/decrease for areas?
- Year over Year change of crime for each area?
- Which areas are most dangerous for female victims?
- What is the vulnerability score for different age groups and genders by area?
- What are the safest and riskiest times (hour/day) for women in each area?
- What is the overall crime distribution for women?
- What is the crime breakdown for women for each area?
- What is the crime count per hour of each day for weekdays and weekends?
- Are there calls that the priority should be escalated for?
- Is the response time degrading in some areas?
- Is there a spike in calls (anomaly detection)?
- What is the utilization of emergency units (LAPD/LAFD/EMS)?
- What is the dispatch failure rate in high-risk areas?
- AWS credentials configured (
~/.aws/credentialswithprivate_accountprofile) - Historical datasets:
crime_data.csvandcrime_data_2020_to_present.csvin./Airflow/files/
# Start entire cluster (all stacks)
./scripts/cluster_up.sh
# Or start individual stacks
./scripts/batch_up.sh # MongoDB + Spark + Airflow
./scripts/stream_up.sh # Kafka + Stream Processor
./scripts/analytics_up.sh # Metabase# Shutdown entire cluster
./scripts/cluster_down.sh
# Or shutdown individual stacks
./scripts/batch_down.sh
./scripts/stream_down.sh
./scripts/analytics_down.sh- Crime Codes: UCR Crime Classification
- Weapons Used: Weapon Categories
- Project Requirements: Technical Specification
- Business Metrics Report - Resolution rates, response times, risk scores, and YoY trends
- Demographic Safety Report - Female vulnerability analysis, age-gender vulnerability scores, and temporal safety patterns
