driftR: driftR: Drift Correcting Water Quality Data

driftRR Documentation

driftR: Drift Correcting Water Quality Data

Description

There are many sources of water quality data including instruments (ex: YSI instruments) and open source data sets (ex: USGS and NDBC), all of which are susceptible to errors/inaccuracies due to drift. driftR provides a grammar for cleaning and correcting these data in a "tidy", reproducible manner.

Details

The driftR package implements a series of equations used in Dr. Elizabeth Hasenmueller's hydrology and geochemistry research. These equations correct continuous water quality monitoring data for incremental drift that occurs over time. There are two forms of corrections included in the package - a one-point calibration and a two-point calibration. One-point and two-point calibration values are suited for different types of measurements. The package is currently written for the easiest use with YSI Sonde products.

There are four key verbs that are introduced in driftR:

  • read: The dr_readSonde function imports and properly formats output from YSI Sonde instrument

  • factor: The dr_factor function calculates factors based on the time of the observation and the total amount of time that the instrument had been deployed. They are used in the equations for both the one-point and two-point drift corrections.

  • correct: The dr_correctOne and dr_correctTwo functions take both the factors and standard values as parameters for calculating drift corrected versions of specific measurements.

  • drop: The dr_drop function allows for removing erroneous observations from both the head and the tail of the data.

Tidy Evaluation

driftR makes use of tidy evaluation and the pronoun .data, meaning that variable references may be either quoted or unquoted (i.e. bare). This also means that driftR works seamlessly with magrittr pipe operators.

Author(s)

Maintainer: Andrew Shaughnessy andrew.shaughnessy@slu.edu

Authors:

See Also

Useful links:


shaughnessyar/driftR documentation built on July 25, 2022, 8:32 a.m.