Application that stores vehicle accident data in a SQLite database, acts as a web server, and creates a REST API to serve JSON files. Utilizes Google's GoogleMaps API to display city locations of crashes.
-
Install git if not already installed
-
Install Python 2.7
-
Add Python and Python scripts to path variable
-
Install dependencies
-
More documentation on venv
-
Command-line instructions:
pip install virtualenv virtualenvwrapper
virtualenv venv
venv\scripts\activate
pip install -r requirements.txt
deactivate
- Install DB Browser for SQLite
- Follow install instructions.
- Click open database and select database file
- Run the Virtual Envirionment in the project folder via command-line
- run database_setup.py to create the database
- run populate.py to add data to database
- run project.py to run app on the webserver
- Open localhost:5000 in your web browser
venv\scripts\activate
python database_setup.py
python populate.py
python project.py
https://localhost:5000/
|-- /index
|
|-- /crashes
____|
____|--/map/2001
____|--/map/2002
____|--/map/2003
____|--/map/2004
____|--/map/2005
____|--/map/2006
|-- /victims
|-- /vehicles
|-- /injuries
|
|-- /view1
|-- /view3
|-- /view5
|-- /view6
|-- /view7
|-- /view8
|-- /view9
|-- /view10
|
|--/api/2001
|--/api/2002
|--/api/2003
|--/api/2004
|--/api/2005
|--/api/2006
rochacbruno's Flask-googlemaps