knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Wrapper for the UN OCHA ReliefWeb Disaster Events API

CRAN status Lifecycle: stable Travis build status License: GPL-3 CRANlogs

This package provides functionality to access and manage the application programming interface (API) of the United Nations Office for the Coordination of Humanitarian Affairs' (OCHA) ReliefWeb disaster events. It requires a minimal number of dependencies. The function disastr.api() makes it easy to retrieve a user-defined sample of disaster events from ReliefWeb, enabling a seamless integration of regular data updates into the research work flow.

Installation

You can install the released version of disastr.api from CRAN with:

install.packages("disastr.api") # downloads and installs the package from CRAN

You can install the development version from GitLab with:

remotes::install_gitlab("chris-dworschak/disastr.api") # downloads and installs the package from GitLab

Example

Using disastr.api is straight forward. To download data on, for example, the last 20 disaster events, you can supply:

library(disastr.api) # loads the package

my.data.frame <- disastr.api( # stores retrieved disaster events in object my.data.frame
  limit = 20)

head(my.data.frame) # returns the first five observations of the ACLED sample


chris-dworschak/disastr.api documentation built on March 6, 2021, 4:46 a.m.