Skip to content

nismod/irv-autopkg-use

Repository files navigation

irv-autopkg-use

A project exemplifying the irv-autopkg-client API, which is currently hosted at global.infrastructureresilience.org.

Background

The irv-autopkg service allows users to extract portions of global datasets pertaining to climate risk and resilience. The irv-autopkg-client Python package is a client API for interacting with the irv-autopkg service.

This repository consists of several Python notebooks and some supporting modules. The notebooks demonstrate querying the API for available datasets and boundaries. Subsequently, some datasets are visualised and a simple risk calculation performed.

Installation

First, clone this repository:

git clone git@github.com:nismod/irv-autopkg-use.git

To install this project, it is recommended to use the conda environment manager to create an appropriate Python environment. This should install all the necessary dependencies:

conda env create --file environment.yaml

If you prefer, the mamba tool is a faster, drop-in replacement for conda:

mamba env create --file environment.yaml

Usage

To use the notebooks, first activate the Python environment:

conda activate irv-autopkg

Then, from the directory containing this README.md, start a notebook server:

jupyter notebook

And a browser tab should open listing the notebook (.ipynb) files.

Have a read through the first one for examples of how to use the API. Subsequent notebooks demonstrate using downloaded data.

Next steps

Modify the notebooks as you require, or use them as inspiration for writing your own scripts.

To avoid saving notebook outputs in git, run:

nbstripout --install

Then git add and git diff should ignore notebook outputs.

About

Exemplifying the irv-autopkg-client API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published