HackUCI2019
IS YOUR CAR SAFE?
Do you ever wonder if your car is safe after you parked?
Using Google Maps API and an incident dataset located at https://data.sfgov.org/Public-Safety/Police-Department-Incident-Reports-2018-to-Present/wg3w-h783, we created an application that can display incidents near your location and based on the number of incidents, we determine if your parking spot is safe or not!
User can give their location, and the application shows them all vehicle-related incidents, given a radius, such as vehicle thefts.
Implemented with HTML, CSS, Javascript, Python, and Flask.
Locations are limited to just San Francisco, CA.
SETUP
Clone this repository
Setup Virtual Environment:
2a. Ensure pip is upgraded
python3 -m pip install --user --upgrade pip2b. Install virtualenv
MAC: python3 -m pip install --user virtualenv Windows: py -m pip install --user virtualenv2c. Create virtual environment
MAC: python3 -m virtualenv venv Windows: py -m virtualenv envInstall dependencies:
3a. Activate virtualenv: source venv/bin/activate
3b. pip install -r requirements.txt
Retrieve updated vehicle related incident data set:
4a. Export csv file of all police incidents from https://data.sfgov.org/Public-Safety/Police-Department-Incident-Reports-2018-to-Present/wg3w-h783
4b. Put csv file into project folder and rename to "calls.csv".
4c. Run python BuildDataSet.py
4d. Vehicle related incident data set will be stored in "vehicles.csv".
5e. Remove "calls.csv" because it is a very large file. :)
RUNNING THE PROGRAM:
Get a Google Maps API Key and add it to templates/map.html
Run the following commands:
export FLASK_APP=app.py flask run
Go to the local server displayed: http://127.0.0.1:5000/
Log in or sign up for Devpost to join the conversation.