add_world_regions | R Documentation |
Augments data
with information about the United Nations (UN) geoscheme on three different
grouping tiers based on the UN M49 area code hierarchy.
In total, eight different columns are added:
un_country_code
: UN M49 country code
un_region_tier_1_code
: UN tier-1 region's M49 area code
un_region_tier_1_name
: UN tier-1 region's English name
un_region_tier_2_code
: UN tier-2 region's M49 area code
un_region_tier_2_name
: UN tier-2 region's English name
un_region_tier_3_code
: UN tier-3 region's M49 area code
un_region_tier_3_name
: UN tier-3 region's English name
un_subregion
: Combinatiorial English UN subregion name which, except for Northern Europe, corresponds to the lowest un_region_tier_*_name
.
Tier-1 regions are the highest, i.e. most aggregated UN regions, commonly referred to as continents. Tier-2 regions are also known as "subregions" and tier-3 regions as "sub-subregions".
Only part of all UN tier-2 regions are further divided into UN tier-3 regions, meaning that not all countries are part of a UN tier-3 region. If a country
doesn't belong to any UN tier-3 region, the corresponding un_region_tier_3_*
values will simply be NA
. The un_subregion
column specifically addresses
this issue by providing a uniform combination of un_region_tier_2_name
and un_region_tier_3_name
.
add_world_regions(data, add_un_country_code = TRUE)
data |
RDB referendum data as returned by |
add_un_country_code |
Whether or not to also add a column |
A tibble.
Other referendum data augmentation functions:
add_country_code_continual()
,
add_country_code_long()
,
add_country_name()
,
add_country_name_long()
,
add_former_country_flag()
,
add_period()
,
add_turnout()
,
add_urls()
rdb::rfrnd(id = "5bbbe26a92a21351232dd73f") |>
rdb::add_world_regions() |>
dplyr::select(id,
starts_with("country_"),
starts_with("un_"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.