This is a crime prediction visualization tool that allows users to provide crime data, filter data, and see the process of clustering. This relies on a crime prediction method and an evaluation metric that are proposed by the Data Science Lab at USC. Technologies/packages used: Django, Mapbox GL JS, Spectre.css, jQuery, Keras(tensorflow backend), Scikit-learn. The tool needs to be used when connected to the internet.
Please follow these steps before running the code for the first time.
- Install Python 3
- It is strongly recommended to use virtualenv to manage packages for this tool. Please see [virtualenv] for more details. If you would use virtualenv, you would need to activate it before
- Install required packages that are listed in
requirements.txt
. If you have pip installed, you could runpip install -r packages.txt
to install all the packages. - Start the server by
python djmaps/manage.py runserver
. The application will appear in http://127.0.0.1/index - Open up the browser and use the tool! There are few things to notice:
- Please upload the data you would like to use first. The data has to be formatted in a JSON input file with the following format:
[[<Type>, <Latitude>, <Longitude>, <Date: mm/dd/yyyy>]]
- The sample DPS data is located in:
djmaps/maps/templates/DPSUSC.json
. - All the datapoints provided that are outside of the USC "border area" that we defined will be ignored.
- Please upload the data you would like to use first. The data has to be formatted in a JSON input file with the following format: