An interactive web application for observational data exploration and linear regression modeling of violent crime rates using socioeconomic and demographic indicators across U.S. communities.
Important Note: The statistical associations in this application are observational and descriptive, not causal.
- Project Context: Coursework project for Data Science (NYU Abu Dhabi).
- Author: Ashmit Mukherjee.
The regression model evaluates 6 selected community socioeconomic indicators:
medIncome– Median household income.racepctblack– Percentage Black population.racePctWhite– Percentage White population.racePctAsian– Percentage Asian population.racePctHisp– Percentage Hispanic population.PctRecImmig10– Percentage of population who immigrated within the last 10 years.
Target Variable: ViolentCrimesPerPop (Violent crime rate per population).
Evaluated on an 80/20 single holdout test split (random_state=42):
-
Holdout Test
$R^2$ Score:0.48(0.4845) -
Training Set
$R^2$ Score:0.54
- Source: UCI Machine Learning Repository (Communities and Crime dataset).
- Volume: 1,994 clean community observations (filtered from 2,215 raw records after missing-value removal on the 6 selected features + target).
# Clone the repository
git clone https://github.com/Ansester/crime-prediction-ml.git
cd crime-prediction-ml
# Install dependencies
pip install -r requirements.txt
# Launch the Streamlit application
streamlit run streamlit_app.pycrime-prediction-ml/
├── streamlit_app.py # Streamlit application with EDA & regression model
├── crimedata.csv # Community crime dataset (2,215 raw records)
├── requirements.txt # Python dependencies
├── LICENSE # Repository license
└── README.md # Project documentation
This repository's source code is licensed under the Apache License 2.0.