Summary table of daily data
daily_gwl_summary.Rd
Summary table of daily data
Usage
daily_gwl_summary(
gw_level_dv,
gwl_data,
parameter_cd = NA,
date_col = NA,
value_col = NA,
approved_col = NA,
stat_cd = NA
)
Arguments
- gw_level_dv
data frame, daily groundwater level data. Often obtained from
readNWISdv
. UseNULL
for no daily data.- gwl_data
data frame returned from
readNWISgwl
, or data frame with a date, value, and approval columns. Using the convention: lev_dt (representing date), lev_age_cd (representing approval code), and lev_va or sl_lev_va (representing value) will allow defaults to work. UseNULL
for no discrete data.- parameter_cd
If data in gw_level_dv comes from NWIS, the parameter_cd can be used to define the value_col. If the data doesn't come directly from NWIS services, this can be set to
NA
,and this argument will be ignored.- date_col
the name of the date column. The default is
NA
, in which case, the code will try to get the column name automatically based on NWIS naming conventions. If both gw_level_dv and gwl_data data frames require custom column names, the first value of this input defines the date column for gw_level_dv, and the second defines gwl_data.- value_col
the name of the value column. The default is
NA
, in which case, the code will try to get the column name automatically based on NWIS naming conventions. If both gw_level_dv and gwl_data data frames require custom column names, the first value of this input defines the value column for gw_level_dv, and the second defines gwl_data.- approved_col
the name of the column to get provisional/approved status. The default is
NA
, in which case, the code will try to get the column name automatically based on NWIS naming conventions. If both gw_level_dv and gwl_data data frames require custom column names, the first value of this input defines the approval column for gw_level_dv, and the second defines gwl_data.#' @param stat_cd If data in gw_level_dv comes from NWIS, the stat_cd can be used to help define the value_col.- stat_cd
If data in gw_level_dv comes from NWIS, the stat_cd can be used to help define the value_col.
Examples
# site <- "263819081585801"
p_code_dv <- "62610"
statCd <- "00001"
# gw_level_dv <- dataRetrieval::readNWISdv(site, p_code_dv, statCd = statCd)
gw_level_dv <- L2701_example_data$Daily
daily_gwl_summary(gw_level_dv,
gwl_data = NULL,
parameter_cd = p_code_dv)
#> begin_date end_date days percent_complete lowest_level p5 p10
#> 1 1978-10-01 2021-02-28 14807 96 -51.08 -38.418 -33.88
#> p25 p50 p75 p90 p95 highest_level
#> 1 -28.34 -21.84 -16.84 -12.118 -9.15 -2.81
gwl_data <- L2701_example_data$Discrete
daily_gwl_summary(gw_level_dv,
gwl_data = gwl_data,
parameter_cd = p_code_dv)
#> begin_date end_date days percent_complete lowest_level p5 p10 p25
#> 1 1978-10-01 2021-03-01 15261 99 -51.3 -38.49 -34 -28.49
#> p50 p75 p90 p95 highest_level
#> 1 -21.96 -16.96 -12.25 -9.211 -2.81