MyNixOS website logo
Description

Access Indonesian Data via Public APIs and Curated Datasets.

Provides functions to access data from public RESTful APIs including 'Nager.Date', 'World Bank API', and 'REST Countries API', retrieving real-time or historical data related to Indonesia, such as holidays, economic indicators, and international demographic and geopolitical indicators. The package also includes a curated collection of open datasets focused on Indonesia, covering topics such as consumer prices, poverty probability, food prices by region, tourism destinations, and minimum wage statistics. The package supports reproducible research and teaching by integrating reliable international APIs and structured datasets from public, academic, and government sources. For more information on the APIs, see: 'Nager.Date' <https://date.nager.at/Api>, 'World Bank API' <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392>, and 'REST Countries API' <https://restcountries.com/>.

IndonesiAPIs

License: MIT CRAN status CRAN downloads (monthly) CRAN downloads (total) DOI


The IndonesiAPIs package provides a unified interface to access open data from the World Bank API, Nager.Date API, and the REST Countries API, with a focus on Indonesia. It allows users to retrieve up-to-date or historical information on topics such as economic indicators, population statistics, national holidays, and basic geopolitical details.

In addition to API-access functions, the package includes a curated collection of open datasets related to Indonesia. These datasets cover a wide range of topics including consumer prices, poverty probability, food prices by region, tourism destinations, and minimum wage statistics.

Installation

You can install the IndonesiAPIs package from CRAN with the following R function:


install.packages("IndonesiAPIs")

Usage

After installation, load the package and start exploring and using its functions and datasets.


library(IndonesiAPIs)

IndonesiAPIs Functions

Below is a list of the main functions included in the package:

  • get_indonesia_child_mortality(): Get Under-5 Mortality Rate in Indonesia from World Bank

  • get_indonesia_cpi(): Get Indonesia's Consumer Price Index from World Bank

  • get_indonesia_energy_use(): Get Indonesia's Energy Use (kg of oil equivalent per capita) from World Bank

  • get_indonesia_gdp(): Get Indonesia's GDP (Current US$) from World Bank

  • get_indonesia_holidays(): Get official public holidays in Indonesia for a given year, e.g. get_indonesia_holidays(2025)

  • get_indonesia_hospital_beds(): Get Hospital Beds per 1,000 People in Indonesia from World Bank

  • get_indonesia_life_expectancy(): Get Indonesia's Life Expectancy at Birth from World Bank

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

  • get_indonesia_population(): Get Indonesia's Total Population from World Bank

  • get_indonesia_unemployment(): Get Indonesia's Unemployment Rate from World Bank

  • get_country_info_idn(): Get Key Country Information About Indonesia from the REST Countries API

  • view_datasets_IndonesiAPIs(): View Available Datasets in IndonesiAPIs

Dataset Suffixes

Each dataset in IndonesiAPIs is labeled with a suffix to indicate its structure and type:

  • _df: A standard data frame.

  • _tbl_df: A tibble data frame object.

Datasets Included in IndonesiAPIs

In addition to API access functions, IndonesiAPIs offers a curated collection of open datasets focused on Indonesia. These preloaded datasets cover a wide range of topics including consumer prices, poverty probability, food prices by region, tourism destinations, and minimum wage statistics. Below are some featured examples:

  • Bali_tbl_df: A tibble containing food price data in Bali, Indonesia.

  • indonesia_minwage_tbl_df: A tibble containing monthly minimum wage or Upah Minimum Regional (UMR) data in Indonesian Rupiah (IDR) across various regions of Indonesia from 1997 to 2025.

  • DKIJakarta_tbl_df: A tibble containing food price data in DKI Jakarta, Indonesia.

Example Code:


# Load the package

library(IndonesiAPIs)

# Retrieves essential information about Indonesia

get_country_info_idn()

# Get Indonesia's Population (Total) from World Bank

get_indonesia_population()

# Load a dataset

data(DKIJakarta_tbl_df)

# Shows six rows of the dataset

head(DKIJakarta_tbl_df)

# Display the structure of the dataset

str(DKIJakarta_tbl_df)

# Shows the whole dataset

View(DKIJakarta_tbl_df)


Metadata

Version

0.1.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows