Learn R Programming

SouthKoreAPIs

The SouthKoreAPIs 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 South Korea. It allows users to retrieve up-to-date or historical information on topics such as economic indicators, population statistics, national holidays, and key geopolitical details.

In addition to API-access functions, the package includes one of the largest curated collections of open datasets related to South Korea. These datasets cover a wide range of topics including public health outbreaks, demographics, social surveys, elections, economic indicators, natural disasters, administrative divisions, air quality, climate data, energy consumption, cultural information, and financial markets.

Installation

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


install.packages("SouthKoreAPIs")

Usage

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


library(SouthKoreAPIs)

SouthKoreAPIs Functions

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

  • get_southkorea_child_mortality(): Get South Korea’s Under-5 Mortality Rate data from the World Bank.

  • get_southkorea_cpi(): Get South Korea’s Consumer Price Index (2010 = 100) data from the World Bank.

  • get_southkorea_energy_use(): Get South Korea’s Energy Use (kg of oil equivalent per capita) data from the World Bank.

  • get_southkorea_gdp(): Get South Korea’s GDP (current US$) data from the World Bank.

  • get_southkorea_holidays(): Get official public holidays in South Korea for a given year, e.g., get_southkorea_holidays(2025).

  • get_southkorea_hospital_beds(): Get South Korea’s Hospital Beds (per 1,000 people) data from the World Bank.

  • get_southkorea_literacy_rate(): Get South Korea’s Adult Literacy Rate data from the World Bank.

  • get_southkorea_life_expectancy(): Get South Korea’s Life Expectancy at Birth data from the World Bank.

  • get_southkorea_population(): Get South Korea’s Total Population data from the World Bank.

  • get_southkorea_unemployment(): Get South Korea’s Total Unemployment Rate data from the World Bank.

  • get_country_info_kr(): Get key country information for South Korea.

  • view_datasets_SouthKoreAPIs(): View available curated datasets included in SouthKoreAPIs.

Dataset Suffixes

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

  • _df: A standard data frame.

  • _tbl_df: A tibble data frame object.

  • _list: A list object.

  • _sf: A sf (Simple Features) object.

Datasets Included in SouthKoreAPIs

In addition to API access functions, SouthKoreAPIs offers one of the largest curated collections of open datasets focused on South Korea. These preloaded datasets cover a wide range of topics including public health outbreaks, demographics, social surveys, elections, economic indicators, natural disasters, administrative divisions, air quality, climate data, energy consumption, cultural information, and financial markets. Below are some featured examples:

  • MERSKorea2015_list: A list containing two data frames with information collected during the first weeks of the 2015 MERS-CoV outbreak in South Korea.

  • KoreanSocialSurvey_tbl_df: A tibble containing a sample of data from the Korean General Social Survey (KGSS) conducted in 2023.

  • SeoulMosquito_tbl_df: A tibble containing daily mosquito indicator data and weather measurements for Seoul, South Korea, from 2016 to 2019.

Example Code:


# Load the package

library(SouthKoreAPIs)

# Retrieves essential information about South Korea

get_country_info_kr()

# Get South Korea's Population (Total) from World Bank

get_southkorea_population()

# Load a dataset

data(SouthKoreaBirths_tbl_df)

# Shows six rows of the dataset

head(SouthKoreaBirths_tbl_df)

# Display the structure of the dataset

str(SouthKoreaBirths_tbl_df)

# Shows the whole dataset

View(SouthKoreaBirths_tbl_df)

Copy Link

Version

Install

install.packages('SouthKoreAPIs')

Monthly Downloads

6

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Renzo Caceres Rossi

Last Published

September 1st, 2025

Functions in SouthKoreAPIs (0.1.0)

SeoulMosquito_tbl_df

Mosquito Indicator in Seoul, Korea (2016-2019)
SouthKoreAPIs

SouthKoreAPIs: Access South Korean Data via Public APIs and Curated Datasets
SouthKoreaCovid19_tbl_df

South Korea COVID-19 dataset
SeoulDistrictPop_df

Seoul's Population and Area Data for Districts (2012)
SeoulH3Data_tbl_df

H3 Addresses within Seoul, South Korea
SolarRadiation_df

Solar Radiation Observations in South Korea
SouthKoreaBirths_tbl_df

Births in South Korea
SeoulAdminAreas_sf

Administrative Areas of Seoul, South Korea
demographicsKR_tbl_df

Korean Demographics (2000-2022)
get_southkorea_unemployment

Get South Korea's Unemployment Rate (Total) from World Bank
get_southkorea_literacy_rate

Get South Korea's Adult Literacy Rate
get_southkorea_cpi

Get South Korea's Consumer Price Index (2010 = 100) from World Bank
get_southkorea_hospital_beds

Get South Korea's Hospital Beds (per 1,000 people) from World Bank
get_southkorea_holidays

Get Official Public Holidays in South Korea for a Given Year
get_southkorea_population

Get South Korea's Total Population from World Bank
get_country_info_kr

Get Country Information for South Korea
migrationflows_tbl_df

Annual Origin–Destination Migration Flows Between Korean Regions
get_southkorea_child_mortality

Get South Korea's Under-5 Mortality Rate from World Bank
get_southkorea_gdp

Get South Korea's GDP (current US$) from World Bank
get_southkorea_life_expectancy

Get South Korea's Life Expectancy at Birth (Total, Years) from World Bank
get_southkorea_energy_use

Get South Korea's Energy Use (kg of oil equivalent per capita) from World Bank
view_datasets_SouthKoreAPIs

View Available Datasets in SouthKoreAPIs
KOSPI200_list

Korea Stock Price Index 200 (KOSPI 200)
KoreanSocialSurvey_tbl_df

A Sample of Korean General Social Survey Data, 2023
KPopIdols_tbl_df

All KPop Idols
NFIColumnNames_df

Korean and English Column Names
GasSales_Korea_tbl_df

Korea Natural Gas Sales with Temperature
HeptathlonSeoul1988_df

Olympic Heptathlon Results - Seoul 1988
KoreanElection2017_df

2017 Korea Presidential Election Data
MERSKorea2015_list

Middle East respiratory syndrome in South Korea, 2015
KoreanBoneDensity_df

Bone quality in South Koreans
AutoOwnershipKorea_df

Korean Auto Ownership Data
RegionalKorea_df

Korean Regional Data (2014–2016 Averages)