Learn R Programming

readoecd (version 0.3.0)

get_oecd_unemployment: Get OECD unemployment rates

Description

Downloads (and caches) monthly harmonised unemployment rates for OECD member countries from the OECD Labour Force Statistics database.

Usage

get_oecd_unemployment(countries = "all", start_year = 2000, refresh = FALSE)

Value

A data frame with columns:

country

ISO 3166-1 alpha-3 country code (character)

country_name

English country name (character)

period

Calendar month in "YYYY-MM" format (character)

series

"Unemployment rate" (character)

value

Unemployment rate as a percentage of the labour force (numeric)

unit

"% of labour force" (character)

Arguments

countries

Character vector of ISO 3166-1 alpha-3 country codes, or "all" for all 38 OECD members. Defaults to "all". Run list_oecd_countries() to see available codes.

start_year

Numeric. Earliest year to include. Defaults to 2000.

refresh

Logical. If TRUE, re-download even if a cached copy exists. Defaults to FALSE.

Details

Returns the seasonally adjusted unemployment rate as a percentage of the labour force, for persons aged 15 and over (total, both sexes). This is the standard harmonised series used for cross-country comparisons.

Examples

Run this code
# \donttest{
# All OECD members since 2010
une <- get_oecd_unemployment(start_year = 2010)

# Australia and UK since 2020
une <- get_oecd_unemployment(c("AUS", "GBR"), start_year = 2020)

# Which country had the highest unemployment in 2020?
une2020 <- une[startsWith(une$period, "2020"), ]
une2020_avg <- aggregate(value ~ country_name, une2020, mean)
head(une2020_avg[order(-une2020_avg$value), ], 5)
# }

Run the code above in your browser using DataLab