Skip to contents

iso3_to_regions() takes in a vector of ISO3 codes and returns a vector of specified regions. Currently, this can be codes or English names for UN regions/subregions/intermediate regions, UN DESA regions/subregions, SDG regions/subregions, WHO regions, and World Bank geographical regions and Income Groups.

Usage

iso3_to_regions(
  iso3,
  region = c("who_region", "un_region", "un_subregion", "un_intermediate_region",
    "sdg_region", "sdg_subregion", "gbd_region", "gbd_subregion", "un_desa_region",
    "un_desa_subregion", "wb_region", "wb_ig"),
  year = max(wb_ig_years()),
  name = FALSE,
  language = c("en", "es", "ru", "ar", "zh", "fr")
)

Arguments

iso3

Character vector of ISO3 codes.

region

Type of region to return. Regional classifications available from the WHO, UN, UNSD SDGs, UN DESA, the World Bank (geographic and income based), and IHME's GBD. See the countries documentation for more source details.

year

For World Bank Income Group only, specify the year to return.

name

For UN, UNSD SDG, UN DESA, WB and IHME GBD regions only. If TRUE, return official regional name instead of code.

language

For "un_region", "un_subregion", and "un_intermediate_region" only if returning name. A character value specifying the language of the country names. Should be specified using the ISO2 language code.

Value

Character vector.