Talk originally prepared for Pycon Namibia
An exploration of the power of spatial data, with an application based on John Snow's 1854 Cholera map.
As I discuss, the famous map is somewhat mythical. It was not drawn until months after the epidemic had passed. What if we could do better with modern GIS technology?
/api
contains a Django application which scratches the surface of what's possible with GeoDjango by modelling reports of disease cases with geo-coordinates, and provides a simple Django Rest Framework API to read and write repots.
/api/venues/
is an untested sketch of a way of importing FourSquare venues. It was an ambition for the talk which I didn't have time to complete.
src/app
contains an Angular web application to locate the user and allow them to report disease cases.
api/john-snow-analysis.ipynb
is a Jupyter Notebook containing a simple geospatial simulation and analysis of an "epidemic".
Running the analysis is independent of the other apps, but it will require a PostGIS database.
pip install -r requirements.txt
python api/manage.py migrate
python api/manage.py shell_plus --notebook
## Resources
This talk is a fantastic taster of the GeoPandas's capabilities.
The GeoPandas website is a good introduction to the library.
The official docs are the best place to go for installation advice and to get started.
For creating geo-capable REST APIs in Django, use Django REST Framework.
There are add-ons for read and write GeoJSON.
Shapely brings the spatial modelling power of GEOS into Python, and powers a lot of GeoPandas functionality.
- HotOSM has an awesome tool for downloading Open Street Map data
- Humdata.org has a lot of Namibian data sets
- The Foursquare API is a good source of rich, local data
- GeoFabrik has a wide range of interesting exports