getStationData_all: Data retrieval from NOAA's Integrated Surface Database (ISD)...

View source: R/getStationData_all.R

getStationData_allR Documentation

Data retrieval from NOAA's Integrated Surface Database (ISD) for multiple stations

Description

Retrieves climate data from a multiple ISD stations for a given year range and list of stations. getStationData_all() expands on rnoaa's isd() function, by allowing to append data for multiple years and multiple stations in the same data frame and catching and ignoring errors.

Usage

getStationData_all(years, stationsList)

Arguments

years

year range (numeric).

stationsList

list of stations (data frame, in the same format as what is returned by rnoaa's isd_stations() or isd_stations_seach()).

Value

Returns a data frame with the data for the available years and stations in the range given.

Examples

## Retrieving station lists used in the examples below:
faroeIslands <- isd_stations_search(lat = 61.883097, lon = -6.738111, radius = 92.49) # 6 stations
adakIsland <- isd_stations_search(lat = 51.88, lon = -176.63, radius = 1.3)           # 1 station
iceland <- isd_stations_search(lat = 64.827948, lon = -18.886747, radius = 314.9)     # 92 stations

## getStationData_all() examples:
adak  <- getStationData_all(2008:2009, adakIsland)             # No error messages, no missing years
adak  <- getStationData_all(2010:2018, adakIsland)             # Error messages, no missing years
faroe <- getStationData_all(2020:2021, faroeIslands)           # No error messages, some missing years
icelandSubset <- getStationData_all(2010:2011, iceland[1:20,]) # Error messages and missing years

cbrais/risd documentation built on June 14, 2022, 12:25 a.m.