gw_data_prep: Prepare well data for creating table and plots

View source: R/gw_data_prep.R

gw_data_prepR Documentation

Prepare well data for creating table and plots

Description

Prepare well data for creating table and plots

Usage

gw_data_prep(
  ows,
  report_dates = Sys.Date(),
  remarks = NULL,
  n_days = 14,
  years_min = 5,
  cache_age = 7,
  water_year_start = 10
)

Arguments

ows

Character vector. Observation well numbers (e.g, "OW000")

report_dates

Character vector. Two current dates to explore. By default a date 2 week ago and 4 weeks before that are used.

remarks

Character / data frame. Path to file OR data frame containing remarks on specific observation wells to be included in the main summary table (see Details).

n_days

Numeric. If there is no data on the report date chosen, this is the range of days over which to look for alternative dates with data. Defaults to 2 weeks, meaning 2 weeks before and 2 weeks after a given report date, for a total window of 4 weeks.

years_min

Numeric. Minimum number of years required to to calculate a percentiles

cache_age

Logical. Maximum age in days of cached datasets (not obs well data, but metadata related to regional maps, aquifer and wells).

Details

remarks can be a file path to a TSV (tab-separated) text file or Excel file contain columns 'ow' and 'remarks', or it can be a data.frame()/tibble() (see examples) containing the same. Note that CSV is not permitted as ',' is used for separating variables which can make it difficult to write out complete, complex remarks.

Examples


## Not run: 

wells <- c('OW400')

gw_data <- gw_data_prep(ows = wells)


## End(Not run)


bcgov/bcgwlreports documentation built on Aug. 9, 2024, 10:47 p.m.