finddatasets: Find Datasets

Description Usage Arguments Value Examples

View source: R/finddatasets.R

Description

This function creates a table of dataset id values using lists of parameters, search terms, and sites.

Usage

1
2
3
4
5
6
7
8
finddatasets(
  sites,
  parameters,
  searchterms,
  removeterms,
  graphic.interface = FALSE,
  duplicate.handling = FALSE
)

Arguments

sites

(optional) an object of type character with the exact name of each site you want to download in aquarius. If left blank (and graphic interface is FALSE) 12 ARCN/CAKN shallow lake sites will be used.

parameters

(optional) an object of type character with a clean output name for the given parameter If parameters are not provided, 19 parameters related to the ARCN/CAKN shallow lakes projects will be used.

searchterms

is an object of type character with a short bit of text that is uniquely identifiable to that parameter and will be found in the correct dataset id regardless of site. The order of these terms must correspond to the parameters. (The first parameter is paired with the first search term) If this argument is left blank then search terms relating to the 19 ARCN/CAKN shallow lakes sites will be used.

removeterms

The removeterms argument (optional) is an object of type character which prevents any datasets from being included if they contain any of these terms.

graphic.interface

(optional) a (boolean) TRUE/FALSE statement that determines whether or not to use the graphic interface to ask for additional sites. The graphic interface only allows selection of sites that contain "AK" or "Alaska" in the folder name.

duplicate.handling

(optional) a boolean (TRUE/FALSE) statement. If FALSE the tool will skip assigning a dataset ID when there are mutliple datasets that match the search terms for a given site. If TRUE it will use a graphic box to ask the user which dataset to use each time there are multiple options.

Value

A data frame of dataset IDs by site and parameter. This data frame can be used with the downloadaquariusdata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Finding the dataset IDs for the default ARCN/CAKN parameters at the site "BELA-088"
ParameterTable <- finddatasets("BELA-088", removeterms = "synoptic")

# Using the graphic interface to select more sites
ParameterTable <- finddatasets("BELA-088",graphic.interface = TRUE)

# Using the default site list and remove term "synoptic"
ParameterTable <- finddatasets(removeterms = "synoptic")

# Using the duplicate handler to prompt the user when multiple dataset IDs exist matching the search term
ParameterTable <- finddatasets("DENA-023", duplicate.handling = TRUE)

# Downloading some example weather station data. Specifying sites, parameters, search terms, and remove terms.
ParameterTable <- finddatasets(sites=c("BELA_DVLA2", "YUCH_CLCA2","KELA2","KAVA2","LMHA2","CZOA2"),
                              parameters = c("WindSpeed","Wind Direction","SolarRadiation","RelativeHumidity", "AirTemp"),
                              searchterms = c("WSM","WDD","SRW","RHP","AT"),
                              removeterms = c("WSMP","WDDP","Therm","AT1","HMP","109"),
                              duplicate.handling = TRUE)

DylanSchertz/AquariusToolsAK documentation built on Feb. 15, 2022, 12:06 a.m.