The goal of this project was use crime incident data from 2010-2020 to develop machine learning models that could be used to predict crime incident rates in the future.
Analysis can be viewed by clicking HERE
- b_model.ipynb
a. Tests features in a naive bayes model and a deep learning neural network model - b_prophet.ipynb
a. Uses fbprophet library to analyze incident data and develop a forecast
b. Outputs trend by year and by week of the year for analysis
c. Outputs interactive plotly reports as html - b_time_series_final.ipynb
a. Uses simple moving average to develop trend models for weekly incident forecasts
b. Evaluates total incident count, incidents by neighborhood, and incidents by offense - b_time_series_test.ipynb
a. Notebook used to test variations on simple moving average forecasting - randomforest_abp.ipynb
a. Random Forest model to predict ucrCode
b. Generates a Top 10 Features barchart
c. Generates a Tree Plot of the model
d. Performs hyperparameter tuning using GridSearchCV. - GJeter_RFM_highest_crime_neighborhood.ipynb
a. Random forest model focused on the highest crime rate neighborhood in Minneapolis - Downtown West - GJeter_RFM_nieghborhood.ipynb
a. Random forest model to identify in which neighborhood crime is most likely to occur.
- Tableau Crime Rate Story
a. Visualizes crime trends for each UCR category - Tableau Crime Heat Map
a. Heat map that shows crime density by year for each UCR category - Leaflet.js Cluster Group Map
a. Loads Data from the GeoIncident.json file created by the csv_geojson.py app.
b. Loads Minneapolis neighborhood shape data from the Minneapolis_Neighborhoods.geojson file which was downloaded from opendata.minneapolismn.gov.
c. Creates a ClusterGroup of the incident markers
d. Creates a polyline of the neighborhood markers
e. Marker includes case number, neighborhood, crime, and date of incident popup.
- incident_data/data_clean.ipynb
a. Cleans the incident csv files and combines them into one csv file. - b_eda.ipynb
a. Imports incidents file for exploratory data analysis to identify trends in the data - csv_geojson.py
a. Creates a geojson file of the combined incident data. - csv_to_html.ipynb
a. Creates html files of interactive Plotly visualizations.