Learn R Programming

IndonesiAPIs (version 0.1.1)

get_indonesia_literacy_rate: Get Indonesia's Literacy Rate (Age 15+) from World Bank

Description

Retrieves Indonesia's literacy rate for adults aged 15 and above, expressed as a percentage, for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SE.ADT.LITR.ZS.

Usage

get_indonesia_literacy_rate()

Arguments

Value

A tibble with columns:

  • indicator: Indicator name.

  • country: Country name ("Indonesia").

  • year: Year (integer).

  • value: Literacy rate (numeric percentage).

Returns NULL if the API is unavailable or returns an error.

Details

The function sends a GET request to the World Bank API. If the request fails (timeout, network error, or invalid HTTP status), the function returns NULL with an informative message.

Examples

Run this code
# \donttest{
get_indonesia_literacy_rate()
# }

Run the code above in your browser using DataLab