Skip to contents

Returns a tibble of available countries and regions in the WEO database.

Usage

weo_list_countries(pattern = NULL)

Arguments

pattern

Optional character string to filter countries by name or ISO code

Value

A tibble with columns:

country_code

ISO 3-letter country code

country_name

Full name of the country

Examples

# List all countries
weo_list_countries()
#> # A tibble: 196 × 2
#>    country_code country_name       
#>    <chr>        <chr>              
#>  1 AFG          Afghanistan        
#>  2 ALB          Albania            
#>  3 DZA          Algeria            
#>  4 AND          Andorra            
#>  5 AGO          Angola             
#>  6 ATG          Antigua and Barbuda
#>  7 ARG          Argentina          
#>  8 ARM          Armenia            
#>  9 ABW          Aruba              
#> 10 AUS          Australia          
#> # ℹ 186 more rows

# Search for specific countries
weo_list_countries("united")
#> # A tibble: 3 × 2
#>   country_code country_name        
#>   <chr>        <chr>               
#> 1 ARE          United Arab Emirates
#> 2 GBR          United Kingdom      
#> 3 USA          United States