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

# Fetch IDP data at Admin Level 0
idp_admin0_df <- get_idp_admin0_data(CountryName='Ethiopia', FromRoundNumber=1, ToRoundNumber=10)
head(idp_admin0_df)
#>    id                                     operation admin0Name admin0Pcode
#> 1 824                        Countrywide monitoring   Ethiopia         ETH
#> 2 148                        Countrywide monitoring   Ethiopia         ETH
#> 3 834                        Countrywide monitoring   Ethiopia         ETH
#> 4 869 Ethiopia - Gedeo and West Guji Rapid Response   Ethiopia         ETH
#> 5 293                      Northern Ethiopia Crisis   Ethiopia         ETH
#> 6 300                      Northern Ethiopia Crisis   Ethiopia         ETH
#>   numPresentIdpInd       reportingDate yearReportingDate monthReportingDate
#> 1          1696145 2017-12-31T00:00:00              2017                 12
#> 2          1742461 2018-02-28T00:00:00              2018                  2
#> 3          1613436 2018-04-30T00:00:00              2018                  4
#> 4           359113 2018-07-30T00:00:00              2018                  7
#> 5           131590 2021-01-31T00:00:00              2021                  1
#> 6           378392 2021-02-28T00:00:00              2021                  2
#>   roundNumber assessmentType
#> 1           8             SA
#> 2           9             SA
#> 3          10             SA
#> 4           1             SA
#> 5           2             SA
#> 6           3             SA