Skip to contents

Retrieves Japan's under-five mortality rate (per 1,000 live births) for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SH.DYN.MORT.

Usage

get_japan_child_mortality()

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SH.DYN.MORT

Value

A tibble with the following columns, or NULL if the API is unavailable:

  • indicator: Indicator name (e.g., "Mortality rate, under-5 (per 1,000 live births)")

  • country: Country name ("Japan")

  • year: Year of the data (integer)

  • value: Under-5 mortality rate per 1,000 live births (numeric)

Details

This 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.

Note

Requires internet connection.

See also

Examples

# \donttest{
# Requires internet connection
result <- get_japan_child_mortality()
if (!is.null(result)) {
  print(result)
}
#> # A tibble: 13 × 4
#>    indicator                                       country  year value
#>    <chr>                                           <chr>   <int> <dbl>
#>  1 Mortality rate, under-5 (per 1,000 live births) Japan    2022   2.4
#>  2 Mortality rate, under-5 (per 1,000 live births) Japan    2021   2.4
#>  3 Mortality rate, under-5 (per 1,000 live births) Japan    2020   2.4
#>  4 Mortality rate, under-5 (per 1,000 live births) Japan    2019   2.5
#>  5 Mortality rate, under-5 (per 1,000 live births) Japan    2018   2.5
#>  6 Mortality rate, under-5 (per 1,000 live births) Japan    2017   2.6
#>  7 Mortality rate, under-5 (per 1,000 live births) Japan    2016   2.7
#>  8 Mortality rate, under-5 (per 1,000 live births) Japan    2015   2.8
#>  9 Mortality rate, under-5 (per 1,000 live births) Japan    2014   2.9
#> 10 Mortality rate, under-5 (per 1,000 live births) Japan    2013   3  
#> 11 Mortality rate, under-5 (per 1,000 live births) Japan    2012   3.1
#> 12 Mortality rate, under-5 (per 1,000 live births) Japan    2011   3.3
#> 13 Mortality rate, under-5 (per 1,000 live births) Japan    2010   3.3
# }