Learn R Programming

stationaRy (version 0.5.1)

station_coverage: Find out which additional data fields a station has recorded

Description

Get a tibble of information on which additional data fields a particular station has during a specified year range.

Usage

station_coverage(
  station_id,
  years = NULL,
  wide_tbl = FALSE,
  grouping = NULL,
  local_file_dir = NULL
)

Arguments

station_id

A station identifier composed of the station's USAF and WBAN numbers, separated by a hyphen.

years

The years for which station met data will be collected. If not specified then all records for all available years will be obtained for the station.

wide_tbl

A wide table of a single row for the station can be generated by setting this to TRUE. In this arrangement, additional data field categories will appear as columns (having counts of observations as values for the period of years). This is useful when collecting station coverage tables for multiple stations, since the rows can be safely bound together. By default, this is set to FALSE.

grouping

An option to group and summarize counts of observations by "year" or by "month". If these keywords aren't provided then summarization will occur over the entire period specified by years.

local_file_dir

Path to local meteorological data files. If specified, then data files will be downloaded to and retrieved from this location and not from the remote data store.

Value

A tibble.

Examples

Run this code
# NOT RUN {
# Obtain a coverage report of the
# additional data that the met
# station with the ID value of
# "999999-63897" has over a two-
# year period
met_data <- 
  station_coverage(
    station_id = "999999-63897",
    years = 2013:2014
  )
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab