Skip to main content

Access data for anticipating humanitarian risk

Project description

OCHA AnticiPy: Access data for anticipating humanitarian risk

license Test Status PyPI Status Documentation Status Coverage Status pre-commit Code style: black Imports: isort

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.

Installing

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]

A Simple Example

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)

Contributing

For guidance on setting up a development environment, see the contributing guidelines

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocha-anticipy-1.1.3.tar.gz (115.7 kB view hashes)

Uploaded Source

Built Distribution

ocha_anticipy-1.1.3-py3-none-any.whl (87.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page