get_kd_best: Return best available secchi/Kd

Usage Arguments Details Value Examples

Usage

1
get_kd_best(id, years, datasource = NA)

Arguments

id

The character ID for the requested data

years

Integer vector of years for which you want Kd values

datasource

NA (for no filter) or vector of string sources to filter. Get options in dataset using unique(secchi$datasource).

Details

This implements a hierarchical selection routine. The hierarchy is:

  1. Mean in-situ secchi data for each year available

  2. Mean satellite secchi data for each year availble

  3. Overall mean in-situ secchi value for the lake

  4. Overall mean satellite secchi value for the lake

  5. Population mean of in-situ data (currently 2.46566 meters)

This guarantees you will always get a secchi value for a lake. This does not mean that lake has observed secchi data, as 'population mean' is the catch-all.

Value

A data frame with columns 'year', 'secchi_avg', and 'source'.

Examples

1
2
#get the best available secchi depths for Sparkling lake
get_kd_best('WBIC_1881900', 1979:2012)

USGS-R/lakeattributes documentation built on May 9, 2019, 8:13 p.m.