knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
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
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.