
Get Under-5 Mortality Rate in Indonesia from World Bank
Source:R/get_indonesia_child_mortality.R
get_indonesia_child_mortality.RdRetrieves Indonesia'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.
Source
World Bank Open Data API: https://data.worldbank.org/indicator/SH.DYN.MORT
Value
A tibble with the following columns:
indicator: Indicator name (e.g., "Mortality rate, under-5 (per 1,000 live births)")country: Country name ("Indonesia")year: Year of the data (integer)value: Under-5 mortality rate per 1,000 live births (numeric)
Returns NULL if the API is unavailable or returns an error.
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.
Examples
# \donttest{
get_indonesia_child_mortality()
#> # A tibble: 13 × 4
#> indicator country year value
#> <chr> <chr> <int> <dbl>
#> 1 Mortality rate, under-5 (per 1,000 live births) Indonesia 2022 21.3
#> 2 Mortality rate, under-5 (per 1,000 live births) Indonesia 2021 22
#> 3 Mortality rate, under-5 (per 1,000 live births) Indonesia 2020 22.8
#> 4 Mortality rate, under-5 (per 1,000 live births) Indonesia 2019 23.6
#> 5 Mortality rate, under-5 (per 1,000 live births) Indonesia 2018 24.5
#> 6 Mortality rate, under-5 (per 1,000 live births) Indonesia 2017 25.4
#> 7 Mortality rate, under-5 (per 1,000 live births) Indonesia 2016 26.4
#> 8 Mortality rate, under-5 (per 1,000 live births) Indonesia 2015 27.4
#> 9 Mortality rate, under-5 (per 1,000 live births) Indonesia 2014 28.6
#> 10 Mortality rate, under-5 (per 1,000 live births) Indonesia 2013 29.7
#> 11 Mortality rate, under-5 (per 1,000 live births) Indonesia 2012 31
#> 12 Mortality rate, under-5 (per 1,000 live births) Indonesia 2011 32.2
#> 13 Mortality rate, under-5 (per 1,000 live births) Indonesia 2010 33.6
# }