This library aims to develop an approach to catastrophe modelling that combines satellite imagery analysis and geospatial data science.
Catastrophe modelling relates natural disasters to future pay-outs. With the advent of climate change, however, nature is no longer behaving like it used to, and past data is becoming less predictive of future events. This project responds to this call for action to enable catastrophe modelling by bringing near-time satellite data measuring environmental and social phenomena alongside urban geospatial data. This project enables users to combine these disparate data sources together for timeseries analysis.
- Retrieves building footprints and calculates their centroids using Open Street Map.
- Takes in centroid list from Open Street Map data, and generates a timeseries of satellite band data in
dataframe
format. - From the extracted latitude and longitude values, requests the google streetview image via API and downloads to a local folder (saving the request link amd metadata in
dataframe
format).
- Follow the instructions here to set up an API key. Prerequisites are:
- Google account
- Access to the Google Cloud Platform
- Enable Billing using these instructions in the Google Cloud Project you activated the streetview API in.
- Python > 3.8. If you have not yet installed python/a python version > 3.8 then see these instructions to complete an installation.
- This project uses
poetry
for package management. See here for installation instructions
- Clone this repository
git clone https://github.com/ChristinaLast/reinventing-catastrophe-modelling.git
- Fill in the required environmental variables in
.env.sample
and move to.env
- Export the environmental variables using
source .env
- Initialise the poetry environment using
poetry init
, (docs for installation instructions)
$ cd <local-path>reinventing-catastrophe-modelling
$ poetry init
$ poetry shell
- Build the CLI locally using:
python setup.py develop
- To see the functions available in the CLI
reinventing-catastrophe-modelling --help
- Test the full pipeline works with the default settings
reinventing-catastrophe-modelling run_pipeline