The objective is to predict the number of crimes for all types of crimes listed in the City of Chicago dataset.
To reproduce our result, start by cloning this repo.
git clone https://github.com/Ravisutha/CrimePrediction.git
Following are some packages that are a must to run the code.
If you use anaconda
, it would be simpler to use the environment crime_predict.yml
which can be found in the root directory of this repo.
conda env create -f crime_predict.yml
The Code directory contains code for handling dataset, creating network using networkx, analyzing the data (making predictions) and for visualizing the results. These are categorized into appropriate folders. To predict the number of crime for a given period, navigate to Analysis
directory and run the predict.py
code.
cd ./Code/Analysis
python predict.py
You can check the predicted outputs in ./Data/Total_Data/Output
. To visualize the output:
cd ./Code/Visualize
jupyter notebook boxplot_fullcrime.ipynb