Learn R Programming

jmastats (version 0.3.0)

jma_collect: Collect JMA Historical Weather Data

Description

[Stable]

Refer to the data available in the JMA Historical Weather Data Search. Executed by specifying the target location and date. Currently, not all types of data acquisition are supported.

Usage

jma_collect(
  item = NULL,
  block_no,
  year,
  month,
  day,
  cache = TRUE,
  pack = TRUE,
  quiet = FALSE
)

Value

a tbl object

Arguments

item

Type of weather data to be acquired. Mainly specifies the interval between records (e.g. daily or hourly). See NOTE for details.

block_no

Block number of the location to be observed. It is assumed that block_no is input as a string consisting of a 4- or 5-digit number. If a numeric value is specified, it is processed as a string.

year

select year

month

select month

day

select date (default NULL)

cache

use cash and save to cache. (TRUE, the default)

pack

Whether to packing common variables or not. (TRUE, the default)

quiet

Whether to output information on variable and row combinations that were treated as missing values for some reason. (TRUE, the default)

Examples

Run this code
# \donttest{
# Annually
jma_collect(item = "annually", "1284", year = 2017, month = 11, cache = FALSE)
# Daily
jma_collect(item = "daily", block_no = "0010", year = 2017, month = 11, cache = FALSE)
jma_collect(item = "daily", "0422", year = 2017, month = 11, cache = FALSE)
# Hourly
jma_collect("hourly", "0010", 2018, 7, 30, cache = FALSE)
# Historical Ranking
jma_collect("rank", block_no = "47646", year = 2020, cache = FALSE)
# Climatological normals
jma_collect("nml_ym", block_no = "47646", cache = FALSE, pack = FALSE)
jma_collect("nml_3m", "47646", cache = FALSE, pack = FALSE, quiet = TRUE)
jma_collect("nml_10d", "0228", cache = FALSE, pack = FALSE, quiet = TRUE)
jma_collect("nml_mb5d", "0228", cache = FALSE, pack = FALSE, quiet = FALSE)
# }

Run the code above in your browser using DataLab