Skip to contents

Retrieves the G-TROPIC lookup table for second-level administrative units (ADM2), such as counties, districts, or provinces. The table provides the geographic identifiers and names used to define study areas in gtropic_data().

Use this function to identify valid geographic values before requesting exposure data. Filters that do not match a published value produce an error rather than an empty result.

Usage

gtropic_adm2(
  ADM2_NAME = NULL,
  ADM2_GROUP = NULL,
  WHO_ENTITY = NULL,
  WHO_REGION = NULL,
  version = ":latest",
  cache = NULL
)

Arguments

ADM2_NAME, ADM2_GROUP, WHO_ENTITY, WHO_REGION

Optional character vectors used to restrict the lookup table. Values are matched case-insensitively after normalizing whitespace. Multiple values within an argument are combined with OR; filters supplied through different arguments are combined with AND.

version

Dataset version to use. The default, ":latest", uses the most recent published version. See gtropic_data() for version formats.

cache

Whether downloaded files may be cached. NULL uses getOption("gtropic.cache_enabled"); TRUE or FALSE overrides that setting for this call.

Value

A tibble containing the published ADM2 lookup. Each row represents an administrative unit and includes its stable ADM2_ID and available name, country or territory, and WHO regional classifications.

Examples

# \donttest{
# Review all available administrative units
gtropic_adm2()
#> # A tibble: 49,349 × 5
#>    ADM2_ID                 ADM2_NAME        ADM2_GROUP WHO_ENTITY  WHO_REGION   
#>    <chr>                   <chr>            <chr>      <chr>       <chr>        
#>  1 17698898B68993560499599 Ab Band          AFG        Afghanistan Eastern Medi…
#>  2 17698898B73770643817409 Ab Kamari        AFG        Afghanistan Eastern Medi…
#>  3 17698898B14779938213850 Acheen           AFG        Afghanistan Eastern Medi…
#>  4 17698898B23166050371692 Adraskan         AFG        Afghanistan Eastern Medi…
#>  5 17698898B88187802806148 Ahmad Abad       AFG        Afghanistan Eastern Medi…
#>  6 17698898B56570025970807 Ajristan         AFG        Afghanistan Eastern Medi…
#>  7 17698898B62190249131225 Alasay           AFG        Afghanistan Eastern Medi…
#>  8 17698898B14177024461677 Ali Khail (Jaji) AFG        Afghanistan Eastern Medi…
#>  9 17698898B86734293398191 Aliabad          AFG        Afghanistan Eastern Medi…
#> 10 17698898B28188212808936 Alingar          AFG        Afghanistan Eastern Medi…
#> # ℹ 49,339 more rows

# Find the identifiers used for units in the Philippines
gtropic_adm2(WHO_ENTITY = "Philippines")
#> # A tibble: 86 × 5
#>    ADM2_ID                ADM2_NAME        ADM2_GROUP WHO_ENTITY  WHO_REGION    
#>    <chr>                  <chr>            <chr>      <chr>       <chr>         
#>  1 2640588B11393510524278 Abra             PHL        Philippines Western Pacif…
#>  2 2640588B29392713909073 Agusan del Norte PHL        Philippines Western Pacif…
#>  3 2640588B20221108717018 Agusan del Sur   PHL        Philippines Western Pacif…
#>  4 2640588B21218366338371 Aklan            PHL        Philippines Western Pacif…
#>  5 2640588B82697045094820 Albay            PHL        Philippines Western Pacif…
#>  6 2640588B32523752073662 Antique          PHL        Philippines Western Pacif…
#>  7 2640588B24165862747597 Apayao           PHL        Philippines Western Pacif…
#>  8 2640588B82822310999177 Aurora           PHL        Philippines Western Pacif…
#>  9 2640588B29921835743372 Basilan          PHL        Philippines Western Pacif…
#> 10 2640588B97763445928490 Bataan           PHL        Philippines Western Pacif…
#> # ℹ 76 more rows
# }