Type: Package
Title: Access Japanese Data via Public APIs and Curated Datasets
Version: 0.1.0
Maintainer: Renzo Caceres Rossi <arenzocaceresrossi@gmail.com>
Description: 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 Japan, such as holidays, economic indicators, and international demographic and geopolitical indicators. Additionally, the package includes one of the largest curated collections of open datasets focused on Japan, covering topics such as natural disasters, economic production, vehicle industry, air quality, demographics, and administrative divisions. 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/.
License: MIT + file LICENSE
Language: en
URL: https://github.com/lightbluetitan/japanapis, https://lightbluetitan.github.io/japanapis/
BugReports: https://github.com/lightbluetitan/japanapis/issues
Encoding: UTF-8
LazyData: true
Depends: R (≥ 4.1.0)
Imports: utils, httr, jsonlite, dplyr, scales, tibble
Suggests: ggplot2, testthat (≥ 3.0.0), knitr, rmarkdown
RoxygenNote: 7.3.2
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-08-21 02:52:15 UTC; Renzo
Author: Renzo Caceres Rossi ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2025-08-26 19:30:07 UTC

JapanAPIs: Access Japanese Data via Public APIs and Curated Datasets

Description

This package 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 Japan, such as holidays, economic indicators, international demographic and geopolitical indicators. Additionally, the package includes one of the largest curated collections of open datasets focused on Japan, covering topics such as natural disasters, economic production, vehicle industry, air quality, demographics, and administrative divisions.

Details

JapanAPIs: Access Japanese Data via Public APIs and Curated Datasets

logo

Access Japanese Data via Public APIs and Curated Datasets.

Author(s)

Maintainer: Renzo Caceres Rossi arenzocaceresrossi@gmail.com

See Also

Useful links:


Japanese J1 League Results

Description

This dataset, J1League_tbl_df, is a tibble containing results of Japan's J1 League matches from 2012 to 2022. The dataset includes information such as the season, match date and time, home and away teams, goals scored, and final match result. The dataset preserves the original structure from its source on Kaggle.

Usage

data(J1League_tbl_df)

Format

A tibble with 3,213 observations and 7 variables:

Season

Season year of the match (numeric)

DateTime

Date and time of the match (POSIXct)

Home

Home team name (character)

Away

Away team name (character)

HG

Number of goals scored by the home team (numeric)

AG

Number of goals scored by the away team (numeric)

Res

Final result of the match (character)

Details

The dataset name has been kept as 'J1League_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/irkaal/japanese-j1-league


Japanese National Character Survey Sample

Description

This dataset, JNcharacter_df, is a data frame containing a subset of responses from the Survey on the Japanese National Character. It includes demographic variables and responses related to values, opinions, and attitudes.

Usage

data(JNcharacter_df)

Format

A data frame with 85 observations and 10 variables:

sex

Sex of the respondent (numeric)

age

Age of the respondent (numeric)

pol.party

Political party preference (numeric)

education

Level of education (numeric)

occupation

Occupation category (numeric)

born.again

Religious identification: born again or not (numeric)

difficult

Perception of life as difficult (numeric)

pleasure

Attitude toward pleasure (numeric)

women.job

Opinion on women working (numeric)

money

Importance of money (numeric)

Details

The dataset name has been kept as 'JNcharacter_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the catdap package version 1.3.7


Japanese Atomic Bomb Survivors

Description

This dataset, atomic_bomb_survivors_df, is a data frame containing frequencies of cancer deaths among Japanese atomic bomb survivors, categorized by extent of exposure, years after exposure, and age group. The dataset was used in the journal Statistical Sleuth and analyzed by Gore et al. (2006).

Usage

data(atomic_bomb_survivors_df)

Format

A data frame with 84 observations and 4 variables:

Radians

Radiation exposure level (integer)

Count.Type

Type of count (factor)

Count.Age.Group

Age group at time of observation (factor)

Frequency

Frequency of cancer deaths (integer)

Details

The dataset name has been kept as 'atomic_bomb_survivors_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the ACSWR package version 1.0


Japanese Centenarians Data

Description

This dataset, centenarian_df, is a data frame containing the number of deaths at each year from 1963 to 1980 for Japanese male centenarians. The data is based on Table 2 of Emura and Murotani (2015), and also references the original work of Sibuya & Hanayama (2004).

Usage

data(centenarian_df)

Format

A data frame with 21 observations and 19 variables:

X

Age or identifier (numeric)

X1963

Number of deaths in 1963 (integer)

X1964

Number of deaths in 1964 (integer)

X1965

Number of deaths in 1965 (integer)

X1966

Number of deaths in 1966 (integer)

X1967

Number of deaths in 1967 (integer)

X1968

Number of deaths in 1968 (integer)

X1969

Number of deaths in 1969 (integer)

X1970

Number of deaths in 1970 (integer)

X1971

Number of deaths in 1971 (integer)

X1972

Number of deaths in 1972 (integer)

X1973

Number of deaths in 1973 (integer)

X1974

Number of deaths in 1974 (integer)

X1975

Number of deaths in 1975 (integer)

X1976

Number of deaths in 1976 (integer)

X1977

Number of deaths in 1977 (integer)

X1978

Number of deaths in 1978 (integer)

X1979

Number of deaths in 1979 (integer)

X1980

Number of deaths in 1980 (integer)

Details

The dataset name has been kept as 'centenarian_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the depend.truncation package version 3.0


Earthquake Observation Stations in Japan

Description

This dataset, earthquake_station_sf, is a spatial features (sf) tibble containing information about 671 earthquake observation stations managed by the Japan Meteorological Agency. It includes details such as the prefecture, area, station name, address, and observation period.

Usage

data(earthquake_station_sf)

Format

An sf object with 671 observations and 7 variables:

prefecture

Name of the prefecture (character)

area

Area within the prefecture (character)

station_name

Name of the observation station (character)

address

Physical address of the station (character)

observation_begin

Start date of observation (character)

observation_end

End date of observation, if available (character)

geometry

XY coordinates of the station (sf geometry column)

Details

The dataset name has been kept as 'earthquake_station_sf' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'sf' indicates that the dataset is a spatial features object. The original content has not been modified in any way.

Source

Data taken from the jmastats package version 0.3.0


Get Key Country Information About Japan from the REST Countries API

Description

Retrieves selected, essential information about Japan using the REST Countries API. The function returns a tibble with core details such as population, area, capital, region, and official language(s).

See the API documentation at https://restcountries.com/. Example API usage: https://restcountries.com/v3.1/name/japan?fullText=true.

Usage

get_country_info_jp()

Details

The function sends a GET request to the REST Countries API. If the API returns data for Japan, the function extracts and returns selected fields as a tibble. If the request fails or Japan is not found, it returns NULL and prints a message.

Value

A tibble with the following 8 columns:

Note

Requires internet connection. The data is retrieved in real time from the REST Countries API.

Source

REST Countries API: https://restcountries.com/

Examples

get_country_info_jp()


Get Under-5 Mortality Rate in Japan from World Bank

Description

Retrieves Japan's under-five mortality rate (per 1,000 live births) for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SH.DYN.MORT.

Usage

get_japan_child_mortality()

Details

This function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SH.DYN.MORT

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_child_mortality()
}


Get Japan's Consumer Price Index from World Bank

Description

Retrieves Japan's Consumer Price Index (2010 = 100) for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is FP.CPI.TOTL.

Usage

get_japan_cpi()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/FP.CPI.TOTL

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_cpi()
}


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

Description

Retrieves Japan's energy use per capita, measured in kilograms of oil equivalent, for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is EG.USE.PCAP.KG.OE.

Usage

get_japan_energy_use()

Details

This function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_energy_use()
}


Get Japan's GDP (Current US$) from World Bank

Description

Retrieves Japan's Gross Domestic Product (GDP) in current US dollars for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is NY.GDP.MKTP.CD.

Usage

get_japan_gdp()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/NY.GDP.MKTP.CD

See Also

GET, fromJSON, as_tibble, comma

Examples

if (interactive()) {
  get_japan_gdp()
}


Get Official Public Holidays in Japan for a Given Year

Description

Retrieves the list of official public holidays in Japan for a specific year using the Nager.Date public holidays API. This function returns a tibble containing the date of the holiday, the name in the local language (Japanese), and the English name. It is useful for academic, planning, and data analysis purposes. The information is retrieved directly from the Nager.Date API and reflects the current status of holidays for the requested year. The field names returned are consistent with the API structure.

Usage

get_japan_holidays(year)

Arguments

year

An integer indicating the year (e.g., 2024 or 2025).

Value

A tibble with the following columns:

Source

Data obtained from the Nager.Date API: https://date.nager.at/

Examples

get_japan_holidays(2024)
get_japan_holidays(2025)


Get Hospital Beds per 1,000 People in Japan from World Bank

Description

Retrieves data on the number of hospital beds per 1,000 people in Japan from 2010 to 2022 using the World Bank Open Data API. The indicator used is SH.MED.BEDS.ZS.

Usage

get_japan_hospital_beds()

Details

This function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SH.MED.BEDS.ZS

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_hospital_beds()
}


Get Japan's Life Expectancy at Birth from World Bank

Description

Retrieves Japan's life expectancy at birth (in years) for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SP.DYN.LE00.IN.

Usage

get_japan_life_expectancy()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SP.DYN.LE00.IN

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_life_expectancy()
}


Get Japan's Literacy Rate (Age 15+) from World Bank

Description

Retrieves Japan'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_japan_literacy_rate()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SE.ADT.LITR.ZS

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_literacy_rate()
}


Get Japan's Total Population from World Bank

Description

Retrieves Japan's total population for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SP.POP.TOTL.

Usage

get_japan_population()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SP.POP.TOTL

See Also

GET, fromJSON, as_tibble, comma

Examples

if (interactive()) {
  get_japan_population()
}


Get Japan's Unemployment Rate from World Bank

Description

Retrieves Japan's Unemployment, total ( for the years 2010 to 2022 using the World Bank Open Data API. The indicator used is SL.UEM.TOTL.ZS.

Usage

get_japan_unemployment()

Details

The function sends a GET request to the World Bank API. If the API request fails or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

Note

Requires internet connection. The data is retrieved in real time from the World Bank API.

Source

World Bank Open Data API: https://data.worldbank.org/indicator/SL.UEM.TOTL.ZS

See Also

GET, fromJSON, as_tibble

Examples

if (interactive()) {
  get_japan_unemployment()
}


Hiroshima Atomic Bomb Survivors Cancer Data

Description

This dataset, hiroshima_tbl_df, is a tibble containing data on the number of deaths from leukemia and other cancers among survivors of the Hiroshima atom bomb. The data cover deaths that occurred during the period 1950–1959 among survivors who were aged 25 to 64 years in 1950.

Usage

data(hiroshima_tbl_df)

Format

A tibble with 6 observations and 4 variables:

radiation

Radiation exposure category (character)

leukemia

Number of deaths from leukemia (numeric)

other cancer

Number of deaths from other cancers (numeric)

total cancers

Total number of cancer deaths (numeric)

Details

The dataset name has been kept as 'hiroshima_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the dobson package version 0.4


Japan Birth Demographics

Description

This dataset, japan_birth_stats_tbl_df, is a tibble containing Japan’s birth-related demographic statistics from 1899 to 2022. The dataset includes birth counts by gender, birth rate, fertility rate, infant deaths, stillbirths, birth order, gestational weeks, average parental ages, and legitimacy of births. Some data are missing between the years 1944 and 1946 due to records lost during World War II. The dataset preserves the original structure from its source on Kaggle.

Usage

data(japan_birth_stats_tbl_df)

Format

A tibble with 124 observations and 51 variables:

...1

Index column (numeric)

year

Year of observation (numeric)

birth_total

Total number of births (numeric)

birth_male

Number of male births (numeric)

birth_female

Number of female births (numeric)

birth_rate

Birth rate per 1,000 population (numeric)

birth_gender_ratio

Male to female birth ratio (numeric)

total_fertility_rate

Total fertility rate (numeric)

population_total

Total population (numeric)

population_male

Male population (numeric)

population_female

Female population (numeric)

infant_death_total

Total number of infant deaths (numeric)

infant_death_male

Number of male infant deaths (numeric)

infant_death_female

Number of female infant deaths (numeric)

infant_death_unknown_gender

Infant deaths with unknown gender (numeric)

infant_death_rate

Infant mortality rate (numeric)

infant_death_gender_ratio

Male to female infant death ratio (numeric)

infant_deaths_in_total_deaths

Proportion of infant deaths in total deaths (numeric)

stillbirth_total

Total number of stillbirths (numeric)

stillbirth_male

Number of male stillbirths (numeric)

stillbirth_female

Number of female stillbirths (numeric)

stillbirth_unknown_gender

Stillbirths with unknown gender (numeric)

stillbirth_rate

Stillbirth rate (numeric)

stillbirth_gender_ratio

Male to female stillbirth ratio (numeric)

firstborn

Number of firstborn children (numeric)

secondborn

Number of secondborn children (numeric)

thirdborn

Number of thirdborn children (numeric)

forthborn

Number of fourthborn children (numeric)

fifthborn_and_above

Number of fifthborn and above children (numeric)

weeks_under_28

Births before 28 gestational weeks (numeric)

weeks_28-31

Births between 28 and 31 gestational weeks (numeric)

weeks_32-36

Births between 32 and 36 gestational weeks (numeric)

weeks_37-41

Births between 37 and 41 gestational weeks (numeric)

weeks_over_42

Births after 42 gestational weeks (numeric)

mother_age_avg

Average age of mothers (numeric)

mother_age_firstborn

Average age of mothers for firstborns (numeric)

mother_age_secondborn

Average age of mothers for secondborns (numeric)

mother_age_thirdborn

Average age of mothers for thirdborns (numeric)

mother_age_under_19

Births to mothers under 19 years (numeric)

mother_age_20-24

Births to mothers aged 20–24 (numeric)

mother_age_25-29

Births to mothers aged 25–29 (numeric)

mother_age_30-34

Births to mothers aged 30–34 (numeric)

mother_age_35-39

Births to mothers aged 35–39 (numeric)

mother_age_40-44

Births to mothers aged 40–44 (numeric)

mother_age_over_45

Births to mothers over 45 years (numeric)

father_age_avg

Average age of fathers (numeric)

father_age_firstborn

Average age of fathers for firstborns (numeric)

father_age_secondborn

Average age of fathers for secondborns (numeric)

father_age_thirdborn

Average age of fathers for thirdborns (numeric)

legitimate_child

Number of legitimate children (numeric)

illegitimate_child

Number of illegitimate children (numeric)

Details

The dataset name has been kept as 'japan_birth_stats_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/webdevbadger/japan-birth-statistics


Japan Population Data

Description

This dataset, japan_population_tbl_df, is a tibble containing Japan’s population over time and space. In this dataset you will find the raw population numbers for the prefectures, going as far back as the 1870s. The dataset preserves the original structure from its source on Kaggle.

Usage

data(japan_population_tbl_df)

Format

A tibble with 2,632 observations and 7 variables:

prefecture

Name of the prefecture (character)

year

Year of the population observation (numeric)

population

Total population in that year (numeric)

capital

Name of the prefectural capital (character)

region

Geographic region of the prefecture (character)

estimated_area

Estimated area of the prefecture in square kilometers (numeric)

island

Name of the island to which the prefecture belongs (character)

Details

The dataset name has been kept as 'japan_population_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/jd1325/japan-population-data


Japanese Universities

Description

This dataset, japan_universities_tbl_df, is a tibble containing comprehensive data about 813 universities in Japan. It includes information such as the university name (in English and Japanese), location, type, year founded, number of faculties and departments, availability of graduate and remote programs, and difficulty and review metrics. The dataset preserves the original structure from its source on Kaggle.

Usage

data(japan_universities_tbl_df)

Format

A tibble with 813 observations and 22 variables:

...1

Index column (numeric)

code

University code (character)

name

University name in English (character)

name_jp

University name in Japanese (character)

type

Type of university (e.g., Public, Private) (character)

type_jp

Type of university in Japanese (character)

address

Full address of the university (character)

postal_code

Postal code (character)

phone

Contact phone number (character)

state

Name of the prefecture or region in English (character)

state_jp

Name of the prefecture or region in Japanese (character)

latitude

Latitude coordinate (numeric)

longitude

Longitude coordinate (numeric)

found

Year the university was founded (character)

faculty_count

Number of faculties (numeric)

department_count

Number of departments (numeric)

has_grad

Whether the university has graduate programs (logical)

has_remote

Whether the university offers remote programs (logical)

review_rating

Average user review rating (numeric)

review_count

Number of user reviews (numeric)

difficulty_SD

Standard deviation of difficulty ratings (numeric)

difficulty_rank

Relative difficulty rank (character)

Details

The dataset name has been kept as 'japan_universities_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/webdevbadger/japanese-universities


Japanese Whisky Review Dataset

Description

This dataset, japanese_whisky_tbl_df, is a tibble containing over 1,000 reviews of Japanese whisky. The dataset includes the bottle name, brand, review title, and full review content. The dataset preserves the original structure from its source on Kaggle.

Usage

data(japanese_whisky_tbl_df)

Format

A tibble with 1,130 observations and 5 variables:

...1

Index column (numeric)

Bottle_name

Name of the whisky bottle (character)

Brand

Brand of the whisky (character)

Title

Title of the review (character)

Review_Content

Full text content of the review (character)

Details

The dataset name has been kept as 'japanese_whisky_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/koki25ando/japanese-whisky-review


Climate Stations in Japan

Description

This dataset, jpn_climate_stations_tbl_df, is a tibble containing information about 157 climate observation stations located across various regions and prefectures in Japan. It includes details such as station name, location, altitude, coordinates, and city information.

Usage

data(jpn_climate_stations_tbl_df)

Format

A tibble with 157 observations and 11 variables:

region

Geographical region where the station is located (character)

pref

Prefecture name (character)

no

Station number (character)

station

Station name (character)

altitude

Altitude of the station (character)

latitude

Latitude coordinate (character)

longitude

Longitude coordinate (character)

NS

Latitude direction, North or South (character)

WE

Longitude direction, West or East (character)

yomi

Station name in Japanese phonetic script (character)

city

City name (character)

Details

The dataset name has been kept as 'jpn_climate_stations_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the clidatajp package version 0.5.2


Climate Data in Japan

Description

This dataset, jpn_climate_tbl_df, is a tibble containing climate data from various observation stations across Japan. It includes monthly data on temperature, precipitation, snowfall, solar insolation, and metadata such as station name, location, altitude, and coordinates.

Usage

data(jpn_climate_tbl_df)

Format

A tibble with 3,768 observations and 14 variables:

no

Observation number (numeric)

station

Name of the weather station (character)

month

Month of observation (numeric)

temperature

Average temperature (numeric)

precipitation

Monthly precipitation (numeric)

snowfall

Monthly snowfall (numeric)

insolation

Monthly solar insolation (numeric)

country

Country name (character)

period

Measurement period or time range (character)

altitude

Altitude of the station (numeric)

latitude

Latitude coordinate (numeric)

longitude

Longitude coordinate (numeric)

NS

Latitude direction, North or South (character)

WE

Longitude direction, West or East (character)

Details

The dataset name has been kept as 'jpn_climate_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the clidatajp package version 0.5.2


July 26, 2003 N. Miyagi Earthquake Aftershocks

Description

This dataset, jpn_eq_miyagi_2003_df, is a data frame containing aftershock data from the earthquake of magnitude 6.2 that occurred on 26th July 2003 in northern Miyagi-Ken, Japan. It includes information on the time of occurrence, geographic coordinates, depth, and magnitude of each aftershock event.

Usage

data(jpn_eq_miyagi_2003_df)

Format

A data frame with 2305 observations and 5 variables:

time

Time of aftershock event (numeric)

longitude

Longitude coordinate (numeric)

latitude

Latitude coordinate (numeric)

depth

Depth in kilometers (numeric)

magnitude

Magnitude of the aftershock (numeric)

Details

The dataset name has been kept as 'jpn_eq_miyagi_2003_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the mmpp package version 0.6


Household Consumption and GDP in Japan (1978–2007)

Description

This dataset, jpn_gdp_cons_df, is a data frame containing information on Household Consumption (C) and Gross Domestic Product (GDP, denoted as Y) in Japan from 1978 to 2007. The data is useful for analyzing structural breaks under heteroskedasticity.

Usage

data(jpn_gdp_cons_df)

Format

A data frame with 30 observations and 3 variables:

Year

Calendar year (integer)

C

Household Consumption (integer)

Y

Gross Domestic Product (GDP) (integer)

Details

The dataset name has been kept as 'jpn_gdp_cons_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the SupMZ package version 0.2.0


Half-Caste Manga Characters

Description

This dataset, jpn_manga_hafu_df, is a data frame containing information on half-caste manga characters. It includes attributes such as the year of publication, manga series, character name, gender, parental origin, and physical traits like eye and hair color.

Usage

data(jpn_manga_hafu_df)

Format

A data frame with 296 observations and 9 variables:

Year

Year of publication (integer)

Series

Manga series name (factor)

Character

Character name (factor)

Gender

Gender of the character (factor)

Father

Father's origin (factor)

Mother

Mother's origin (factor)

Eyes

Eye color (factor)

Hair

Hair color (factor)

Notes

Additional notes about the character (factor)

Details

The dataset name has been kept as 'jpn_manga_hafu_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the learningr package version 0.29.1


Japan Prefectures 7x7 Grid Dataset

Description

This dataset, jpn_prefectures_tbl_df, is a tibble representing Japan’s 47 prefectures arranged in a 7x7 grid layout. It includes prefectural codes, names in both romaji and kanji, regions, major islands, and grid coordinates.

Usage

data(jpn_prefectures_tbl_df)

Format

A tibble with 47 observations and 8 variables:

jis_code

JIS code of the prefecture (character)

prefecture

Prefectural name in romaji (character)

region

Geographical region of the prefecture (factor)

major_island

Major island the prefecture belongs to (character)

prefecture_kanji

Prefectural name in kanji (character)

region_kanji

Region name in kanji (factor)

x

X coordinate for grid placement (integer)

y

Y coordinate for grid placement (integer)

Details

The dataset name has been kept as 'jpn_prefectures_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the tabularmaps package version 0.1.0


Suicides in Japan by Sex and Age (1978–2022)

Description

This dataset, jpn_suicides_tbl_df, is a tibble containing the number of suicides in Japan from 1978 to 2022 by sex and age group. The dataset includes suicide counts for males and females, overall suicide rates, and counts by specific age ranges. The dataset preserves the original structure from its source on Kaggle.

Usage

data(jpn_suicides_tbl_df)

Format

A tibble with 45 observations and 14 variables:

year

Year of observation (numeric)

num_suicide_male

Number of male suicides (numeric)

num_suicide_female

Number of female suicides (numeric)

suicide_rate

Overall suicide rate (numeric)

suicide_rate_male

Suicide rate among males (numeric)

suicide_rate_female

Suicide rate among females (numeric)

num_suicide_age_0_19

Number of suicides aged 0–19 (numeric)

num_suicide_age_20_29

Number of suicides aged 20–29 (numeric)

num_suicide_age_30_39

Number of suicides aged 30–39 (numeric)

num_suicide_age_40_49

Number of suicides aged 40–49 (numeric)

num_suicide_age_50_59

Number of suicides aged 50–59 (numeric)

num_suicide_60_plus

Number of suicides aged 60 and above (numeric)

num_suicide_age_unknown

Number of suicides with unknown age (numeric)

num_suicide_total

Total number of suicides (numeric)

Details

The dataset name has been kept as 'jpn_suicides_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/krisztinboros/suicides-in-japan-by-sex-and-age-19782021


Attributes of Some US and Japanese Automobiles

Description

This dataset, jpn_us_cars_df, is a data frame containing information on 45 automobiles from the United States and Japan. It includes attributes such as model name, country of origin, mileage, and price.

Usage

data(jpn_us_cars_df)

Format

A data frame with 45 observations and 4 variables:

Model

Car model (factor)

Country

Country of origin (factor)

Mileage

Mileage in miles per gallon (integer)

Price

Price in US dollars (integer)

Details

The dataset name has been kept as 'jpn_us_cars_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the fma package version 2.5


Yen-Dollar Exchange Rate (Weekly, 1975–1989)

Description

This dataset, jpn_usd_exchange_df, is a data frame containing weekly observations of the yen-dollar exchange rate from 1975 to 1989. It includes spot and forward rates, along with 30-day forward rates.

Usage

data(jpn_usd_exchange_df)

Format

A data frame with 778 observations and 4 variables:

date

Time index of the observation (integer)

s

Spot exchange rate (numeric)

f

Forward exchange rate (numeric)

s30

30-day forward exchange rate (numeric)

Details

The dataset name has been kept as 'jpn_usd_exchange_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the Ecdat package version 0.4-2


Japanese Motor Vehicle Production (1947–1989)

Description

This dataset, jpn_vehicle_prod_ts, is a univariate time series containing the number of motor vehicles produced in Japan from 1947 to 1989. The figures are recorded annually and expressed in thousands.

Usage

data(jpn_vehicle_prod_ts)

Format

A univariate time series with 43 observations:

Time

Yearly observations from 1947 to 1989

Values

Motor vehicle production in Japan (in thousands)

Details

The dataset name has been kept as 'jpn_vehicle_prod_ts' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'ts' indicates that the dataset is a time series object. The original content has not been modified in any way.

Source

Data taken from the fma package version 2.5


Prefectural Informations in Japan

Description

This dataset, jpnprefs_tbl_df, is a tibble containing information about the 47 prefectures of Japan. It includes details such as prefectural names in kanji and romaji, corresponding JIS codes, the region each prefecture belongs to, and the major island associated with each.

Usage

data(jpnprefs_tbl_df)

Format

A tibble with 47 observations and 5 variables:

jis_code

JIS code of the prefecture (character)

prefecture_kanji

Prefectural name in kanji (character)

prefecture

Prefectural name in romaji (character)

region

Geographical region of the prefecture (character)

major_island

Major island the prefecture belongs to (character)

Details

The dataset name has been kept as 'jpnprefs_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the zipangu package version 0.3.3


1995 Kobe Earthquake Data

Description

This dataset, 'kobe_quake_1995_ts', is a time series containing data related to the 1995 Kobe earthquake. The data are organized sequentially with a frequency of 1, and consist of 3,048 observations.

Usage

data(kobe_quake_1995_ts)

Format

A time series with 3,048 observations:

observations

Time series data related to the 1995 Kobe earthquake (numeric)

Details

The dataset name has been kept as 'kobe_quake_1995_ts' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'ts' indicates that the dataset is a time series object. The original content has not been modified in any way.

Source

Data taken from the waveslim package version 1.8.5


Kojima Hideo Tweets (Japanese)

Description

This dataset, kojima_tweets_tbl_df, is a tibble containing 454 original tweets from Hideo Kojima, posted between November 17, 2019, and January 6, 2020. Retweets are excluded. The dataset includes tweet text, engagement metrics, tweet metadata, user handle information, geolocation data, hashtags, mentions, URLs, and media details. The dataset preserves the original structure from its source on Kaggle.

Usage

data(kojima_tweets_tbl_df)

Format

A tibble with 454 observations and 41 variables:

Tweet

Text content of the tweet (character)

Created Date

Date when the tweet was created (character)

Retweets

Number of retweets (numeric)

Favourites

Number of likes (numeric)

Engagement

Sum of retweets and likes (numeric)

No of Hashtags

Count of hashtags used (numeric)

No of User Mentions

Count of user mentions (numeric)

No of URLS added

Count of URLs included (numeric)

No of Media added

Count of media elements attached (numeric)

Tweeted Username

Username who posted the tweet (character)

Replied To Username

Whether it was a reply to another user (logical)

Post Type

Type of post (e.g., tweet, reply, etc.) (character)

Media Type

Type of media included (e.g., photo, video) (character)

Is Quote Tweet

Whether the tweet is a quote (character)

Is Retweeted

Whether the tweet is a retweet (character)

Language (Tweets)

Language of the tweet content (character)

Country

Country information if available (logical)

Location (Tweets)

Geolocation as specified in the tweet (logical)

Location Full Name

Full name of the location (logical)

Location Type

Type of location (logical)

Hashtags

Hashtags used in the tweet (character)

User Mentions

User mentions in the tweet (character)

URLS Used

URLs present in the tweet (character)

Media URLS

Media URLs attached to the tweet (character)

Name

Name associated with the Twitter account (character)

Username

Handle of the Twitter account (character)

Created Date (Handles)

Date when the Twitter account was created (character)

Language (Handles)

Preferred language of the account (character)

Tweets

Total number of tweets from the account (numeric)

Followers

Number of followers (numeric)

Friends

Number of accounts followed (numeric)

Favourites (Handles)

Total number of liked tweets by the account (numeric)

Listed Count

Number of lists the account is included in (numeric)

Location (Handles)

Location listed in the user profile (character)

Protected

Whether the account is protected (character)

Verified

Whether the account is verified (character)

URL

URL included in the profile (character)

Description

Profile description or bio (character)

Profile Image URL

URL of the profile image (character)

Account Age in Days

Age of the account in days (numeric)

Avg Tweets per day

Average tweets per day (numeric)

Details

The dataset name has been kept as 'kojima_tweets_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/luciesteel/kojima-tweets


Japan Life Expectancy and Socioeconomic Indicators (2020)

Description

This dataset, life_exp_japan_tbl_df, is a tibble containing life expectancy and related economic and social indicators for Japan's 47 prefectures as of 2020. It includes variables on healthcare infrastructure, education levels, income, public spending, and environmental indicators. The dataset preserves the original structure from its source on Kaggle.

Usage

data(life_exp_japan_tbl_df)

Format

A tibble with 47 observations and 23 variables:

Prefecture

Name of the Japanese prefecture (character)

Life_expectancy

Average life expectancy (numeric)

Physician

Number of physicians per 100,000 people (numeric)

Junior_col

Number of junior colleges (numeric)

University

Number of universities (numeric)

Public_Hosp

Number of public hospitals (numeric)

Pshic_hosp

Number of psychiatric hospitals (numeric)

Beds_psic

Number of psychiatric hospital beds (numeric)

Nurses

Number of nurses per 100,000 people (numeric)

Avg_hours

Average weekly working hours (numeric)

Salary

Average annual salary (numeric)

Elementary_school

Number of elementary schools (numeric)

Sport_fac

Number of sports facilities (numeric)

Park

Number of parks (numeric)

Forest

Percentage of forest area (numeric)

Income_per capita

Per capita income (numeric)

Density_pop

Population density (people per km²) (numeric)

Hospitals

Total number of hospitals (numeric)

Beds

Total number of hospital beds (numeric)

Ambulances

Number of ambulances (numeric)

Health_exp

Health expenditure per capita (numeric)

Educ_exp

Education expenditure per capita (numeric)

Welfare_exp

Welfare expenditure per capita (numeric)

Details

The dataset name has been kept as 'life_exp_japan_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/gianinamariapetrascu/japan-life-expectancy


Japanese NIKKEI Stock Index

Description

This dataset, nikkei_stock_index_df, is a data frame containing the daily log returns in percent of the NIKKEI stock index for the period from 1984-01-04 to 2000-12-22.

Usage

data(nikkei_stock_index_df)

Format

A data frame with 4,246 observations and 2 variables:

index

Date or index label (character)

value

Daily log return in percent (numeric)

Details

The dataset name has been kept as 'nikkei_stock_index_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the tsgarch package version 1.0.3


Taste Ratings of Japanese Rice Wine (Sake)

Description

This dataset, sake_ratings_df, is a data frame containing data from a study of Japanese rice wine (sake), used to investigate the relationship between two subjective ratings (taste and smell) and a number of physical measurements on 30 brands of sake.

Usage

data(sake_ratings_df)

Format

A data frame with 30 observations and 10 variables:

taste

Subjective taste rating (numeric)

smell

Subjective smell rating (numeric)

pH

pH level (numeric)

acidity1

Acidity measure 1 (numeric)

acidity2

Acidity measure 2 (numeric)

sake

Sake meter value (numeric)

rsugar

Reducing sugar content (numeric)

tsugar

Total sugar content (numeric)

alcohol

Alcohol content (numeric)

nitrogen

Nitrogen content (numeric)

Details

The dataset name has been kept as 'sake_ratings_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the heplots package version 1.7.0


The Seishu Wine Study

Description

This dataset, seishu_wine_df, is a data frame containing data from a study on wine. The study records the odor and taste of wines, with the aim of explaining these characteristics through various chemical properties such as pH concentration, alcohol content, total sugar, and others.

Usage

data(seishu_wine_df)

Format

A data frame with 30 observations and 10 variables:

Taste

Taste rating of the wine (numeric)

Odor

Odor rating of the wine (numeric)

pH

pH concentration (numeric)

Acidity_1

First acidity measurement (numeric)

Acidity_2

Second acidity measurement (numeric)

Sake_meter

Sake meter value (numeric)

Direct_reducing_sugar

Direct reducing sugar content (numeric)

Total_sugar

Total sugar content (numeric)

Alcohol

Alcohol content (numeric)

Formyl_nitrogen

Formyl nitrogen content (numeric)

Details

The dataset name has been kept as 'seishu_wine_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the ACSWR package version 1.0


Shinkansen Stations in Japan

Description

This dataset, shinkansen_stations_tbl_df, is a tibble containing information about 113 Shinkansen train stations across Japan. Each row represents a station and includes its name, the Shinkansen line it belongs to, the year it opened, the prefecture it is located in, the distance from Tokyo Station in kilometers, and the operating company. The dataset preserves the original structure from its source on Kaggle.

Usage

data(shinkansen_stations_tbl_df)

Format

A tibble with 113 observations and 6 variables:

Station_Name

Name of the Shinkansen station (character)

Shinkansen_Line

Name of the Shinkansen line (character)

Year

Year the station opened (numeric)

Prefecture

Prefecture in which the station is located (character)

Distance from Tokyo st

Distance from Tokyo Station in kilometers (numeric)

Company

Operating company of the station (character)

Details

The dataset name has been kept as 'shinkansen_stations_tbl_df' to maintain consistency with the naming conventions in the JapanAPIs package. The suffix 'tbl_df' indicates that this is a tibble data frame. The original content has not been modified in any way.

Source

Data obtained from Kaggle: https://www.kaggle.com/datasets/japandata509/shinkansen-stations-in-japan


East Japan Railway's Tokaido Line Stations

Description

This dataset, tokaido_stations_tbl_df, is a tibble containing information about stations on the Tokaido Line operated by East Japan Railway. It includes each station's code and name.

Usage

data(tokaido_stations_tbl_df)

Format

A tibble with 20 observations and 2 variables:

st_code

Station code (character)

st_name

Station name (character)

Details

The dataset name has been kept as 'tokaido_stations_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the ssrn package version 0.1.0


Tokyo Rainfall Data

Description

This dataset, tokyo_rainfall_vec, is a numeric vector containing Tokyo rainfall data from Kitagawa (1987), analysed also by Rue and Held (2005) and Fahrmeir and Tutz (2013). It includes daily rainfall measurements over a period of 366 days.

Usage

data(tokyo_rainfall_vec)

Format

A numeric vector with 366 observations:

Daily rainfall measurements (numeric values ranging from 0 to 2)

Details

The dataset name has been kept as 'tokyo_rainfall_vec' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'vec' indicates that the dataset is a vector object. The original content has not been modified in any way.

Source

Data taken from the gamlss.data package version 6.0-6


Special Wards of Tokyo

Description

This dataset, tokyo_wards_tbl_df, is a tibble containing information on the 23 special wards of Tokyo. It includes ward numbers, names in both romaji and kanji, along with x and y coordinates for spatial layout.

Usage

data(tokyo_wards_tbl_df)

Format

A tibble with 23 observations and 5 variables:

no

Ward number (character)

ward

Ward name in romaji (character)

ward_kanji

Ward name in kanji (character)

x

X coordinate for grid placement (numeric)

y

Y coordinate for grid placement (numeric)

Details

The dataset name has been kept as 'tokyo_wards_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble object. The original content has not been modified in any way.

Source

Data taken from the tabularmaps package version 0.1.0


Toyota Stock Prices

Description

This dataset, toyota_stock_prices_df, is a data frame containing the average monthly stock prices of Toyota from 1982 to 1998.

Usage

data(toyota_stock_prices_df)

Format

A data frame with 255 observations and 2 variables:

Month

Month number from the beginning of the time series (integer)

Value

Average monthly stock price (numeric)

Details

The dataset name has been kept as 'toyota_stock_prices_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the JapanAPIs package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.

Source

Data taken from the MMAC package version 0.1.2


View Available Datasets in JapanAPIs

Description

This function lists all datasets available in the 'JapanAPIs' package. If the 'JapanAPIs' package is not loaded, it stops and shows an error message. If no datasets are available, it returns a message and an empty vector.

Usage

view_datasets_JapanAPIs()

Value

A character vector with the names of the available datasets. If no datasets are found, it returns an empty character vector.

Examples

if (requireNamespace("JapanAPIs", quietly = TRUE)) {
  library(JapanAPIs)
  view_datasets_JapanAPIs()
}