How mubeen-zaki/crime_analysis works
Crime Analysis is a Flask application for exploring Indian crime data, identifying district hotspots, predicting future risk and crime counts, and viewing forecasts and visualizations. Users submit forms or choose dashboard views; Flask routes select data and prediction logic and return rendered pages. A separate news workflow scrapes crime headlines, geocodes mentioned cities, and generates a heatmap. The README documents additional forecasting and visualization capabilities; some implementation details were not sampled, so those links are cited to the README rather than treated as inspected source.
Main entry points: routes.py Request routes · README.md District hotspots · index.py Location heatmap · Datasets Crime datasets
Components 17
Web application
- Flask app
app.py - Request routes
routes.py - Web pages
templates - Dashboard scripts
static/javascript
Crime analysis
- District hotspots
README.md - Future zone risk
routes.py - State IPC prediction
routes.py - Crime forecasts
Prediction - Crime dashboards
templates/plots - Data tables
static/javascript/table.js
Data and models
- Crime datasets
Datasets - Prediction models
Prediction
News heatmap
- Headline scraper
folium-map/scrapper4.py - Location heatmap
folium-map/index.py - Heatmap page
templates/final.html
Other components
- Dashboard user
- Geocoding service
Connections 18
- Dashboard user → Flask app: uses
README.md - Flask app → Request routes: registers routes
app.py - Request routes → Web pages: renders
routes.py - Request routes → Crime datasets: reads
routes.py - Request routes → Prediction models: loads models
routes.py - Request routes → Future zone risk: classifies risk
routes.py - Request routes → State IPC prediction: predicts IPC
routes.py - Dashboard user → District hotspots: requests hotspots
README.md - District hotspots → Prediction models: clusters districts
README.md - District hotspots → Crime datasets: uses past data
README.md - Dashboard user → Crime forecasts: views forecasts
README.md - Crime forecasts → Crime datasets: forecasts from data
README.md - Dashboard user → Crime dashboards: views charts
README.md - Dashboard user → Data tables: requests tables
static/javascript/table.js - Data tables → Dashboard scripts: loads JSON
static/javascript/table.js - Headline scraper → Location heatmap: provides headlines
folium-map/index.py - Location heatmap → Geocoding service: geocodes cities
folium-map/index.py - Location heatmap → Heatmap page: writes map
folium-map/index.py