Learn R Programming

idmc (version 0.3.1)

idmc_get_data: Get data from the IDMC API

Description

idmc_get_data() calls the IDMC API to retrieve displacement data. The data is converted from JSON to a data frame, date columns converted to Date types, and returned as a dplyr::tibble.

Usage

idmc_get_data(api_url = NULL)

Value

Tibble of displacement data. Description of the data frame variables are included in the documentation for the IDMC IDU API. # nolint

Arguments

api_url

URL to the IDMC API. If NULL, the default, searches for the IDMC_API environment variable.

Examples

Run this code
if (FALSE) { # !is.na(Sys.getenv("IDMC_API", unset = NA))
idmc_get_data()
}

Run the code above in your browser using DataLab