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,866 × 3
#>    id                       country_name country_name_long   
#>    <chr>                    <fct>        <fct>               
#>  1 6694f97dc3cd67046057fed1 Switzerland  Swiss Confederation 
#>  2 66856a7bc3cd67046057fe61 Slovenia     Republic of Slovenia
#>  3 66856972c3cd67046057fe5a Slovenia     Republic of Slovenia
#>  4 66856835c3cd67046057fe53 Slovenia     Republic of Slovenia
#>  5 66856659c3cd67046057fe4b Slovenia     Republic of Slovenia
#>  6 6659b208c3cd67046057fe31 Switzerland  Swiss Confederation 
#>  7 6659b140c3cd67046057fe2d Switzerland  Swiss Confederation 
#>  8 6659af29c3cd67046057fe29 Switzerland  Swiss Confederation 
#>  9 6659ae82c3cd67046057fe25 Switzerland  Swiss Confederation 
#> 10 6659ad59c3cd67046057fe21 Switzerland  Swiss Confederation 
#> # ℹ 17,856 more rows