How kushalkush7/cognitive-crime-analysis001 works
Crime Analysis is a Flask application for exploring Indian crime data and producing analytical and operational outputs. Users enter through the web application: routes serve analytics and case workflows, while selected endpoints invoke FIR briefing, modus-operandi search, and beat patrol planning. The README also describes hotspot clustering, district-trend and IPC-crime predictions, national forecasts, interactive visualizations, and a crime-news heatmap. The sampled excerpts establish several newer endpoint calls; some README-described analytics links are shown as unverified because their implementation was not sampled.
Main entry points: app.py Flask entry · Datasets Crime datasets · routes.py Analytics routes · templates Interactive visualizations
Components 21
Web application
- Flask entry
app.py - Analytics routes
routes.py - Web dashboards
templates - CDR dashboard
static/javascript/cdr_dashboard.js
Case intelligence
- FIR extraction
case_parser.py - Case briefing
case_briefing_copilot.py - CDR analysis
cdr_intelligence.py - MO vector search
mo_vector_service.py - Persistent vector store
Crime analytics
- Crime datasets
Datasets - District hotspots
Prediction - K-means clustering
Prediction - Cluster trend prediction
Prediction - State IPC regression
Prediction - National forecasts
Prediction - Interactive visualizations
templates
Spatial intelligence
- Crime news scraping
folium-map/scrapper4.py - News heatmap
folium-map/index.py - Beat route planning
spatial_beat_engine.py
Other components
- Analyst or officer
- Geocoding service
Connections 21
- Analyst or officer → Flask entry: submits requests
app.py - Flask entry → Analytics routes: uses routes
app.py - Analytics routes → FIR extraction: imports parser
routes.py - Flask entry → Case briefing: generates briefs
app.py - Flask entry → MO vector search: searches cases
app.py - MO vector search → Persistent vector store: queries records
mo_vector_service.py - Flask entry → Beat route planning: generates routes
app.py - Analytics routes → Web dashboards: renders dashboards
- Analyst or officer → CDR dashboard: submits call data
- CDR dashboard → Analytics routes: requests analysis
- Crime datasets → K-means clustering: informs clustering
README.md - K-means clustering → District hotspots: identifies zones
README.md - Crime datasets → Cluster trend prediction: provides crime history
README.md - Cluster trend prediction → District hotspots: predicts cluster trends
README.md - Crime datasets → State IPC regression: provides crime history
README.md - State IPC regression → Interactive visualizations: supports state predictions
README.md - Crime datasets → National forecasts: provides crime history
README.md - National forecasts → Interactive visualizations: feeds forecasts
README.md - Interactive visualizations → Analyst or officer: presents analysis
README.md - Crime news scraping → News heatmap: supplies headlines
folium-map/index.py - News heatmap → Geocoding service: geocodes cities
folium-map/index.py