
Get Japan's Unemployment Rate from World Bank
Source:R/get_japan_unemployment.R
get_japan_unemployment.RdRetrieves Japan's Unemployment, total (
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is SL.UEM.TOTL.ZS.
Source
World Bank Open Data API: https://data.worldbank.org/indicator/SL.UEM.TOTL.ZS
Value
A tibble with the following columns, or NULL if the API is unavailable:
indicator: Indicator name (e.g., "Unemployment, total (country: Country name ("Japan")year: Year of the data (integer)value: Unemployment rate as percentage in numeric form
Details
The function sends a GET request to the World Bank API.
If the API request fails or returns an error status code, the function returns NULL with an informative message.
Examples
# \donttest{
# Requires internet connection
result <- get_japan_unemployment()
if (!is.null(result)) {
print(result)
}
#> # A tibble: 13 × 4
#> indicator country year value
#> <chr> <chr> <int> <dbl>
#> 1 Unemployment, total (% of total labor force) (modeled IL… Japan 2022 2.6
#> 2 Unemployment, total (% of total labor force) (modeled IL… Japan 2021 2.83
#> 3 Unemployment, total (% of total labor force) (modeled IL… Japan 2020 2.81
#> 4 Unemployment, total (% of total labor force) (modeled IL… Japan 2019 2.35
#> 5 Unemployment, total (% of total labor force) (modeled IL… Japan 2018 2.47
#> 6 Unemployment, total (% of total labor force) (modeled IL… Japan 2017 2.82
#> 7 Unemployment, total (% of total labor force) (modeled IL… Japan 2016 3.13
#> 8 Unemployment, total (% of total labor force) (modeled IL… Japan 2015 3.38
#> 9 Unemployment, total (% of total labor force) (modeled IL… Japan 2014 3.59
#> 10 Unemployment, total (% of total labor force) (modeled IL… Japan 2013 4.04
#> 11 Unemployment, total (% of total labor force) (modeled IL… Japan 2012 4.36
#> 12 Unemployment, total (% of total labor force) (modeled IL… Japan 2011 4.55
#> 13 Unemployment, total (% of total labor force) (modeled IL… Japan 2010 5.10
# }