stage_indy_site: Generate a list of files to post as a custom ('indy') site

View source: R/stage_indy_site.R

stage_indy_siteR Documentation

Generate a list of files to post as a custom ('indy') site

Description

This function is designed for truly isolated (non-NWIS, etc.) sites. The site that is created will be named 'indy_[site_num]', where 'indy' is a recognized prefix in mda.streams. If an NWIS gage is available, even if some data is not from NWIS, the site should be established as an 'nwis' site (see post_site) as for other NWIS sites; this will enable lookups of other NWIS data and metadata for the site.

Usage

stage_indy_site(site_num, data, info = as.character(NA),
  long_name = as.character(NA), lat = u(as.numeric(NA), "degN"),
  lon = u(as.numeric(NA), "degE"), alt = u(as.numeric(NA), "ft"),
  var_format = c("mda.streams", "streamMetabolizer"), remove_NAs = TRUE,
  collapse_const = TRUE, version = c("rds", "tsv"), folder = tempdir())

Arguments

site_num

The id, not necessarily numeric that is to follow 'indy_' in the site_name

data

data.frame of data to parse and post

info

character string describing the primary source of data for this site

long_name

Longer character string describing the site, or blank if site_name is prefixed with 'nwis' (in which case this will be looked up)

lat

latitude in degN

lon

longitude in degE

alt

altitude in ft

var_format

What format are the data column names in - mda.streams format (e.g., sitetime, doobs, dosat) or streamMetabolizer format (e.g., solar.time. DO.obs, DO.sat)?

remove_NAs

logical. Should ts rows with NAs be removed?

collapse_const

If a data column has all identical values, should these be collapsed to a single const row in the ts file?

version

the output version for the file (rds, tsv)

folder

the folder in which to save the staged information


USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.