TheIndonesiAPIs package provides a unified interface toaccess open data from theWorld Bank API,Nager.Date API, and theREST CountriesAPI, with a focus onIndonesia. It allowsusers to retrieve up-to-date or historical information on topics such aseconomic indicators, population statistics, national holidays, and basicgeopolitical details.
In addition to API-access functions, the package includes a curatedcollection of open datasets related toIndonesia. Thesedatasets cover a wide range of topics including consumer prices, povertyprobability, food prices by region, tourism destinations, and minimumwage statistics.
You can install theIndonesiAPIs package from CRAN withthe following R function:
install.packages("IndonesiAPIs")After installation, load the package and start exploring and usingits functions and datasets.
library(IndonesiAPIs)Below is a list of the main functions included in the package:
get_indonesia_child_mortality(): Get Under-5Mortality Rate in Indonesia from World Bank
get_indonesia_cpi(): Get Indonesia’s Consumer PriceIndex from World Bank
get_indonesia_energy_use(): Get Indonesia’s EnergyUse (kg of oil equivalent per capita) from World Bank
get_indonesia_gdp(): Get Indonesia’s GDP (CurrentUS$) from World Bank
get_indonesia_holidays(): Get official publicholidays in Indonesia for a given year,e.g. get_indonesia_holidays(2025)
get_indonesia_hospital_beds(): Get Hospital Beds per1,000 People in Indonesia from World Bank
get_indonesia_life_expectancy(): Get Indonesia’sLife Expectancy at Birth from World Bank
get_indonesia_literacy_rate(): Get Indonesia’sLiteracy Rate (Age 15+) from World Bank
get_indonesia_population(): Get Indonesia’s TotalPopulation from World Bank
get_indonesia_unemployment(): Get Indonesia’sUnemployment Rate from World Bank
get_country_info_idn(): Get Key Country InformationAbout Indonesia from the REST Countries API
view_datasets_IndonesiAPIs(): View AvailableDatasets in IndonesiAPIs
Each dataset inIndonesiAPIs is labeled with asuffix to indicate its structure and type:
_df: A standard data frame.
_tbl_df: A tibble data frame object.
In addition to API access functions,IndonesiAPIs offersa curated collection of open datasets focused onIndonesia. These preloaded datasets cover a wide rangeof topics including consumer prices, poverty probability, food prices byregion, tourism destinations, and minimum wage statistics. Below aresome featured examples:
Bali_tbl_df: A tibble containing food price data inBali, Indonesia.
indonesia_minwage_tbl_df: A tibble containingmonthly minimum wage or Upah Minimum Regional (UMR) data in IndonesianRupiah (IDR) across various regions of Indonesia from 1997 to2025.
DKIJakarta_tbl_df: A tibble containing food pricedata in DKI Jakarta, Indonesia.
# Load the packagelibrary(IndonesiAPIs)# Retrieves essential information about Indonesiaget_country_info_idn()# Get Indonesia's Population (Total) from World Bankget_indonesia_population()# Load a datasetdata(DKIJakarta_tbl_df)# Shows six rows of the datasethead(DKIJakarta_tbl_df)# Display the structure of the datasetstr(DKIJakarta_tbl_df)# Shows the whole datasetView(DKIJakarta_tbl_df)