Skip to contents

Retrieve IDP data at Admin 0 level based on specified parameters. At least one of the following parameters must be provided: Operation, CountryName, or Admin0Pcode.

Usage

get_idp_admin0_data(
  Operation = NULL,
  CountryName = NULL,
  Admin0Pcode = NULL,
  FromReportingDate = NULL,
  ToReportingDate = NULL,
  FromRoundNumber = 0,
  ToRoundNumber = 0
)

Arguments

Operation

Optional; Name of the DTM operation for which the data was collected.

CountryName

Optional; Name of the country where the data was collected.

Admin0Pcode

Optional; Country code (ISO 3166-1 alpha-3).

FromReportingDate

Optional; Start date for the reporting period (format: 'YYYY-MM-DD').

ToReportingDate

Optional; End date for the reporting period (format: 'YYYY-MM-DD').

FromRoundNumber

Optional; Starting round number for the data collection range.

ToRoundNumber

Optional; Ending round number for the data collection range.

Value

A data frame containing the IDP Admin0 data matching the specified criteria.

Examples

if (FALSE) { # !identical(Sys.getenv("DTM_SUBSCRIPTION_KEY"), "")
# Fetch IDP data at Admin Level 0
idp_admin0_df <- get_idp_admin0_data(CountryName = "Ethiopia",
                                     FromRoundNumber = 1, 
                                     ToRoundNumber = 10)
head(idp_admin0_df)
}