Learn R Programming

metScanR (version 1.2.3)

getVars: Filter environmental monitoring stations by reported elements

Description

Return metadata of environmental monitoring stations that collect specific element-level (environmental variables, e.g., air temperature) metadata via 'fuzzy search'.

Usage

getVars(vars, startVarsDate, endVarsDate, ...)

Arguments

vars

(character) Elements(s)/variables(s) of interest. The user can search for general, environmental terms, such as 'temperature,' or 'wind,' and the function will return environmental stations that collect the specified elements ('fuzzy search'). Keep in mind that the database contains ~107,000 stations, worldwide. Searching for a general term such as 'temperature' will return many stations. The user is advised to search for more granular terms, e.g., using sub terms such as 'air temperature,' or 'soil temperature,' if they wish to narrow their results.

startVarsDate

(character) start date in the form of "YYYY-MM-DD" for filtering environmental variables by active measurement dates. Optional

endVarsDate

(character) end date in the form of "YYYY-MM-DD" for filtering environmental variables by active measurement dates. Optional

...

auto-populates when called from siteFinder() wrapper

Value

A list comprising environmental monitoring sites that observe or collect the element(s)/variable(s) specified in vars

See Also

siteFinder mapResults metScanR_DB

Examples

Run this code
# NOT RUN {
#return a list of sites that collect humidity data
  getVars(vars="humidity")
#return a list of sites that collect soil temperature and/or wind data
  getVars(vars=c("soil temperature","wind"))
#return a list of sites that collected snow depth data during 1970-01-01 thru 1985-05-10
  getVars(vars = "snow depth",startVarsDate = "1970-01-01",endVarsDate = "1985-05-10")
# }

Run the code above in your browser using DataLab