IndonesiAPIs

License: MIT

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:

Dataset Suffixes

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

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:

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)