Skip to contents

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

Usage

get_idp_admin2_data(
  Operation = NULL,
  CountryName = NULL,
  Admin0Pcode = NULL,
  Admin1Name = NULL,
  Admin1Pcode = NULL,
  Admin2Name = NULL,
  Admin2Pcode = 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).

Admin1Name

Optional; Name of level 1 administrative boundaries.

Admin1Pcode

Optional; Place code of level 1 administrative boundaries.

Admin2Name

Optional; Name of level 2 administrative boundaries.

Admin2Pcode

Optional; Place code of level 2 administrative boundaries.

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 Admin2 data matching the specified criteria.

Examples

# Fetch IDP data at Admin Level 2
idp_admin2_df <- get_idp_admin2_data(Operation='Yemen conflict', CountryName="Yemen")
head(idp_admin2_df)
#>       id      operation admin0Name admin0Pcode admin1Name admin1Pcode
#> 1 388373 Yemen conflict      Yemen         YEM    Shabwah        YE21
#> 2 390177 Yemen conflict      Yemen         YEM     Sana'A        YE23
#> 3 391140 Yemen conflict      Yemen         YEM  Al Mahwit        YE27
#> 4 391151 Yemen conflict      Yemen         YEM  Al Mahwit        YE27
#> 5 391696 Yemen conflict      Yemen         YEM     Sa'Ada        YE22
#> 6 391707 Yemen conflict      Yemen         YEM     Sa'Ada        YE22
#>      admin2Name admin2Pcode numPresentIdpInd       reportingDate
#> 1       Al Talh      YE2102               33 2015-07-30T00:00:00
#> 2 Bani Hushaysh      YE2304             1311 2015-07-30T00:00:00
#> 3      Al Khabt      YE2704             1064 2015-07-30T00:00:00
#> 4    Al Mahwait      YE2709             6700 2015-07-30T00:00:00
#> 5       Sa'Adah      YE2215             3000 2015-07-30T00:00:00
#> 6         Sahar      YE2211             3250 2015-07-30T00:00:00
#>   yearReportingDate monthReportingDate roundNumber assessmentType
#> 1              2015                  7           3             BA
#> 2              2015                  7           3             BA
#> 3              2015                  7           3             BA
#> 4              2015                  7           3             BA
#> 5              2015                  7           3             BA
#> 6              2015                  7           3             BA