get_indonesia_population: Get Indonesia's Total Population from World Bank
Description
Retrieves Indonesia's total population for the years 2010 to 2022
using the World Bank Open Data API. The indicator used is SP.POP.TOTL.
Usage
get_indonesia_population()
Arguments
Value
A tibble with:
indicator: Indicator name.
country: Country name ("Indonesia").
year: Year (integer).
value: Population (numeric).
value_label: Formatted population (e.g., "126,000,000").
Returns NULL if API request fails or data is unavailable.
Details
If the API request fails for any reason (network issue, timeout,
invalid HTTP status, or malformed JSON), the function returns NULL
with an informative message.