View source: R/getStationData_all.R
getStationData_all | R Documentation |
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.
getStationData_all(years, stationsList)
years |
year range (numeric). |
stationsList |
list of stations (data frame, in the same format as what is returned by rnoaa's |
Returns a data frame with the data for the available years and stations in the range given.
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.