View source: R/Functions_NOAA_Stations.R
Select_NOAA_Stations | R Documentation |
This function retrieves the NOAA stations, like Get_NOAA_Stations, then selects a group of stations based on certain properties.
The output dataframe sacrifices robustness for simplicity to make code easier to understand.
If unique_stations is TRUE then the resultant dataframe will have one row per station.
Select_NOAA_Stations( localSave = FALSE, refresh = FALSE, localFileName = "stations.Rdata", selectElements = NULL, beginYear = NULL, endYear = NULL, unique_stations = FALSE, unique_cols = NULL, add_dist_from_coord = NULL, reorder_by_dist = TRUE )
localSave |
saves / retrieves information locally |
refresh |
forces a refresh of cached station information |
localFileName |
local name of file used to cache station information |
selectElements |
list of elements to limit select |
beginYear |
the earliest year of data collection |
endYear |
the last year of data collection |
unique_stations |
reorganize so output only includes unique stations |
unique_cols |
when collapsing to only unique stations, this is the list of which rows to include. |
add_dist_from_coord |
if set to a coordinate, distance from coord is added |
reorder_by_dist |
TRUE if the stations are reordered by dist from a coord |
If selectElements parameter has a list of elements, like c('PRCP'), then the list will be narrowed to only those elements. If unique is used then a column for each element will identify if the data is available.
# If NOAA stations have not been downloaded in a while stations <- Select_NOAA_Stations(refresh = TRUE) # If local saves are not desired stations <- Select_NOAA_Stations(localSave = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.