mda.streams: Functions for managing the Continental Stream Metabolism data...

mda.streamsR Documentation

Functions for managing the Continental Stream Metabolism data on ScienceBase

Description

mda.streams stands for Macro Data Analysis for Streams.

Details

For lower-level functions generic to all ScienceBase tasks, see sbtools. For higher-level functions that make it easy to use the Powell Center project data in particular, see powstreams.

Logging in

Use the login_sb command to establish session credentials for working with ScienceBase.

Use get_scheme and set_scheme to see/specify the ScienceBase scheme to use. The default is "mda_streams", but another option is "mda_streams_dev" for trial modifications to SB.

Navigating ScienceBase

  • list_sites - lists all site IDs (e.g. "nwis_04067500") that are currently on ScienceBase

  • list_datasets - Given a site ID, returns a list of timeseries and other datasets stored for that site

Reading data from ScienceBase

  • download_ts - given a site ID and variable name, finds and downloads the timeseries file from SB

  • get_watershed_WFS - gets watershed geospatial data

  • get_watershed_WMS - gets watershed geospatial data

Preparing data to write to ScienceBase

  • stage_nwis_sitelist - generate a list of site IDs that meet data availability criteria

Writing to ScienceBase

  • post_site - given a site ID, create an SB node for the site

  • post_ts - given a data.frame with data, do a little format checking and post those data to SB. Where would such data come from?

  • post_watershed - given a vector of watershed filenames, posts those files to SB. Where do the files come from?

Internal functions

  • build_data.R - creates the data needed within the package

  • mda_helpers.R - utilities used within the package. Includes functions make_ts_name, parse_ts_name, make_site_name, and parse_site_name.


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