Aggregates environmental data by temporal resolution, computing mean and standard error for visualization in time series plots. Uses dbplyr lazy evaluation for efficient database queries.
Value
data.frame with columns:
time- aggregated time valueavg- mean ofqtystd- standard error ofqty(sd/n)upr- upper confidence bound (avg + std)lwr- lower confidence bound (avg - std)
Details
For seasonal plots (ts_res = "quarter"), the function adds a wrapping
row to ensure visual continuity across the year boundary. Data is collected
from database only at the end of aggregation.
See also
expr_time_env for temporal transformation logic
plot_ts for visualization