Plots incidents on a map and provides data for the incident, including:
- Weather at the time of the incident.
- Parcel data for the location of the incident.
- Install python 2.7.6
- Install virtualenv and create an env
virtualenv incidents
(optional) - If you created a virtualenv, acivate it.
cd incidents
. ./bin/activate
- Clone the repository
git clone https://github.com/fullbit-tech/incidents_map.git
- Enter directory and install python requirements
cd incidents_map
pip install -r requirements.txt
- Install mongodb
- Start the server with
FLASK_APP=app.py flask run -h 0.0.0.0 -p 5000
if you need remote access, otherwiseFLASK_APP=app.py flask run
- Point your browser to http://localhost:5000 or http://<your_server_ip>:5000
The application allows you to upload .json
files using a form to add incidents to the map.
For historical weather data, it uses http://api.worldweatheronline.com
.
If no parcel data exists, the data will not attempt to display. For both provided test data files, I was unable to get parcel results using the incident address. I queried for existing results, changed the address strings to them and it worked. So you may want to check to make sure your test cases have parcel entries in the API to make sure you'll get to see the data being retrieved.
- Needs significantly better validation and error handling.
- Edge case handling needs to be implemented for third-party API libs.
- A unique constaint needs to be added to prevent the same incident from being added multiple times.
- The map needs to adjust it's zoom to consider all placed incidents.