Learn R Programming

GHCNr (version 1.4.6)

stations: Get GHCNd Inventory

Description

Get GHCNd Inventory

Usage

stations(
  filename,
  variables = c("tmin", "tmax", "prcp"),
  first_year,
  last_year
)

Value

The table with the GHCNd stations.

Arguments

filename

Character, the filename of the inventory, if already downloaded.

variables

Character, vector of the variables to include.

first_year

Integer, the year since when data should be recorded.

last_year

Integer, the year until when data should be recorded.

Details

If filename is not provided, this will download the inventory from <"https://www.ncei.noaa.gov/pub/data/ghcn/daily/ghcnd-inventory.txt">. In alternative, you can download the invetory yourself and load it (see examples).

Examples

Run this code
if (FALSE) {
dest <- tempfile()
download_inventory(dest)
s <- stations(dest)
}

Run the code above in your browser using DataLab