water_chem: CSLS Water Chemistry data

Description Usage Format Details Source Examples

Description

All water chemistry data associated with the Central Sands Lakes Study from:

Usage

1

Format

A data frame with the following columns:

lake

name of "lake", either "Pleasant", "Long", "Plainfield", or "Precip

site_type

type of site, e.g. "lake", "precipitation", "upgradient", "nogradient", "downgradient", "deep"

site_id

unique id for CSLS site

date

date of measurement

dnr_parameter

DNR parameter code for analyte measured

description

Description of analyte measured

result

value of sample result

units

units of sample result

depth1_m

sample depth (m)

depth2_m

if sample depth is a range, deepest end of that range (m)

lod

limit of detection for lab method

loq

limit of quality for lab method

flag

notes if data is flagged for being under the LOD ("LOD"), under the LOQ ("LOQ"), analyzed past the holding date ("AGE"), duplicate sample ("DUPLICATE"), blank sample ("BLANK"), other reason ("COMMENT"), bad well ("BAD_WELL") or not flagged ("NONE")

flag_reason

longer comment about reason for flag

Details

Raw csv data is processed in the data-raw/ subdirectory of this project with the functions import_isotopes, import_NADP, import_SWIMS.R, import_HOBO, and combine_chem which are run by runall_cslsdata.R.

import_isotopes loads isotope measurements for the CSLS lakes and extracts isotopic measurements for 18O and 2H (duterium) flagged as VALID = TRUE.

import_NADP loads in NADP data and cleans with the following steps:

  1. Defines SWIMS equivalent of NADP parameters of interest

  2. Limits only valid data to the desired site (default: Devil's Lake).

  3. Rearranges data frame for parameters of interest

  4. Retains any LOD flags, eliminates clearly invalid results (< 0)

  5. Converts NADP param names to SWIMS equivalents

  6. Add units, date, and site_id

import_SWIMS.R loads in SWIMS data associated with the Central Sands Lakes Study (project: "csls") and cleans with the following steps:

  1. Transforms column names to characters that are easier to work with in R.

  2. Imports and appends LDES data, if using.

  3. Uses station_name and WBIC to match samples to CSLS site ids. Makes sure all samples have a CSLS site_id match.

  4. Extracts and parses sample depth or sample depth range, where exists.

  5. Updates column classes (to datetime, numeric, etc.)

  6. Performs QC on results and makes note of any flagged samples

  7. Subsets to useful columns and returns SWIMS data frame.

import_HOBO.R loads in HOBO data for a lake, cleans up formatting and handling of missing data, and rearranges so that information about the depth of measurements and the parameter measured is treated as data, rather than embedded in column names. It also merges depth information (either depth from bottom or depth from top) with lake level information to get the elevation above mean sea level of each sensor measurement. There is currently no cleaning done to remove measurements when the sensor was out of the water for downloads.

combine_chem.R combines all water chemistry data frames, using the dictionary and gw_levels to define site types.

Source

https://dnr.wi.gov/topic/surfacewater/swims/

http://nadp.slh.wisc.edu/data/sites/list/?net=NTN

Examples

1
water_chem <- CSLSdata::water_chem

WDNR-Water-Use/CSLSdata documentation built on Nov. 12, 2021, 2:36 a.m.