download_discrete: Download discrete marine data from the Monitoring Portal

View source: R/download_discrete.R

download_discreteR Documentation

Download discrete marine data from the Monitoring Portal

Description

King County VPN connection required! This function allows you to easily download any subset of parameters for a given site (or sites) from the Marine Monitoring Portal. The data will be saved as a .csv file so you don't have to keep re-downloading it. Speedy and convenient! Automatically removes bad and missing data with qualifier codes 4 or 9. Based on code by Curtis DeGasperi.

Usage

download_discrete(sites, parms_in, fname, include_bad = F)

Arguments

sites

a character vector with locator codes for stations. These stations are the ones for which data will be downloaded.

parms_in

a character vector with short parameter names (ParmName) for which you want data. See discrete_parms, which is data built into this package, for a complete list.

fname

a string indicating the filename where the data will be saved. The filename is relative to the current working directory, getwd().

include_bad

a logical value indicating whether to include the bad and missing data. Automatically set to FALSE.

Examples


sites <- c("NSEX01", "JSUR01", "LSNT01")
parms_in <- c("NNN", "DO")
fname <- "my_discrete_data.csv"

## Not run: download_discrete(sites, parms_in, fname, include_bad = T)

tsparksm/kcmwq documentation built on Sept. 2, 2023, 11:30 p.m.