🌊 Reinventing catastrophe modelling

Introduction

This library aims to develop an approach to catastrophe modelling that combines satellite imagery analysis and geospatial data science.

🤓 Why might you want to use this

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.

Workflow

  1. Retrieves building footprints and calculates their centroids using Open Street Map.
  2. Takes in centroid list from Open Street Map data, and generates a timeseries of satellite band data in dataframe format.
  3. 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).

🛠️ How to use this repository

🔧 Setup

🛣️ Set up Google Streetview API Key

  1. Follow the instructions here to set up an API key. Prerequisites are:
  • Google account
  • Access to the Google Cloud Platform
  1. Enable Billing using these instructions in the Google Cloud Project you activated the streetview API in.

📦 Requirements

  • 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

🔨 Local Setup

  1. Clone this repository
git clone https://github.com/ChristinaLast/reinventing-catastrophe-modelling.git
  1. Fill in the required environmental variables in .env.sample and move to .env
  2. Export the environmental variables using
source .env
  1. Initialise the poetry environment using poetry init, (docs for installation instructions)
$ cd <local-path>reinventing-catastrophe-modelling
$ poetry init
$ poetry shell
  1. Build the CLI locally using:
python setup.py develop
  1. To see the functions available in the CLI
reinventing-catastrophe-modelling --help
  1. Test the full pipeline works with the default settings
reinventing-catastrophe-modelling run_pipeline