Skip to contents

Augments data with an additional column holding the official full English name(s) of the country in which the referendum took place.

Usage

add_country_name_long(data)

Arguments

data

RDB referendum data as returned by rfrnds(). A data frame that at minimum contains the column country_code (with ISO 3166-1 alpha-2 or ISO 3166-3 alpha-4 codes).

Value

A tibble.

Examples

rdb::rfrnds(quiet = TRUE) |>
  rdb:::add_country_name_long() |>
  dplyr::select(id,
                starts_with("country_name"))
#> # A tibble: 17,889 × 3
#>    id                       country_name  country_name_long            
#>    <chr>                    <fct>         <fct>                        
#>  1 670cd145c3cd67046058015c Switzerland   Swiss Confederation          
#>  2 66fff490c3cd670460580111 Liechtenstein Principality of Liechtenstein
#>  3 66ffdfe3c3cd6704605800fc Switzerland   Swiss Confederation          
#>  4 66f686cfc3cd6704605800a0 Switzerland   Swiss Confederation          
#>  5 66f68317c3cd67046058009c Switzerland   Swiss Confederation          
#>  6 66d6da9cc3cd670460580053 Switzerland   Swiss Confederation          
#>  7 66cde603c3cd67046057fff5 Switzerland   Swiss Confederation          
#>  8 66c46f86c3cd67046057ff53 Switzerland   Swiss Confederation          
#>  9 66c46cf6c3cd67046057ff4f Switzerland   Swiss Confederation          
#> 10 66c46c3ac3cd67046057ff4b Switzerland   Swiss Confederation          
#> # ℹ 17,879 more rows