OCHA AnticiPy is a Python library for simple downloading and processing of data related to the anticipation of humanitarian risk, from climate observations and forecasts to food insecurity.
The datasets that we currently support are:
- CHIRPS rainfall
- COD ABs (Common Operational Datasets administrative boundaries)
- FEWS NET food insecurity
- GloFAS river discharge
- IRI seasonal rainfall forecast
- USGS NDVI (normalized difference vegetation index)
For more information, please see the documentation.
Install and update using pip:
pip install ocha-anticipy
Some modules of the toolbox have specific dependencies not installed by default. These are documented within each module, but all dependencies can be installed using.
pip install -U ocha-anticipy[full]
OCHA AnticiPy downloads data to the directory referenced by the
environment variable OAP_DATA_DIR
. Before beginning, please make
sure that this environment variable is defined and points to where you would
like the data to go.
Next, you can simply download the admin boundary CODs for Nepal, and retrieve provinces as a GeoDataFrame:
from ochanticipy import create_country_config, CodAB
country_config = create_country_config('npl')
codab = CodAB(country_config=country_config)
codab.download()
provinces = codab.load(admin_level=1)
For guidance on setting up a development environment, see the contributing guidelines