How nani381c/crime-prediction-using-machine-learning works
This is a Streamlit dashboard for analyzing crime data in India, forecasting city-level crime, and visualizing hotspots and risk. Users upload a dataset or request NCRB data, then explore forecasts, classification, maps, and comparisons. The graph separates ingestion, modeling, spatial visualization, and dashboard responsibilities. The excerpts show the main preprocessing, forecasting, and classifier calls; some other dashboard integrations are supported by the SOURCE INDEX and README rather than full call-site excerpts.
Main entry points: streamlit_app.py Streamlit dashboard · data_prep.py Dataset ingestion · model_lstm.py Crime forecasting · classifier_model.py Crime classifier
Components 13
Dashboard
- Streamlit dashboard
streamlit_app.py - State analytics
streamlit_app.py - City comparison
streamlit_app.py - Live risk mapping
streamlit_app.py - Animated crime map
streamlit_app.py
Data preparation
- Dataset ingestion
data_prep.py
Analysis models
- Crime forecasting
model_lstm.py - Crime classifier
classifier_model.py - Forecast explanations
shap_explainer.py
Spatial visualization
- Hotspot and risk maps
hotspot_cluster.py - City geodata builder
visuals_map.py
Other components
- Dashboard user
- NCRB data portal
Connections 12
- Dashboard user → Streamlit dashboard: uses
README.md - NCRB data portal → Streamlit dashboard: provides data
README.md - Streamlit dashboard → Dataset ingestion: preprocesses uploads
streamlit_app.py - Streamlit dashboard → Crime forecasting: trains forecast
streamlit_app.py - Streamlit dashboard → Crime classifier: trains classifier
streamlit_app.py - Streamlit dashboard → Hotspot and risk maps: generates hotspots
streamlit_app.py - Streamlit dashboard → City geodata builder: builds map data
streamlit_app.py - Streamlit dashboard → Forecast explanations: requests explanations
streamlit_app.py - Streamlit dashboard → State analytics: presents analytics
README.md - Streamlit dashboard → City comparison: compares cities
streamlit_app.py - Streamlit dashboard → Live risk mapping: renders risk map
README.md - Streamlit dashboard → Animated crime map: renders animation
streamlit_app.py