← Back to all sparks
T

tbrf

ANALYTICS
Velocity0.0

R package tbrf by mps9506 — release notes from GitHub.

Time-based rolling statistics for water-quality data, finally getting plotting and padding built in.

rolling-statisticswater-qualitytime-seriesenvironmental-datar-package
Current state
tbrf computes rolling statistics over time windows rather than fixed row counts — geometric means, confidence intervals and related summaries indexed by date. That distinction matters for irregularly sampled environmental monitoring data, where a fixed-width window spans different amounts of real time. Version 0.1.7 folds in stat_stepribbon() from ggalt, ships an Entero example dataset for lognormal workflows, and adds na.pad across the tbr_ family.
Where it's heading
The package spent its middle releases absorbing upstream breakage — a lubridate duration redefinition, a tibble 3.0.0 subassignment change, tidyselect internals. The 0.1.7 release breaks that pattern: it is the first in five years to add capability rather than repair it, and it does so by internalising a stat from an abandoned dependency instead of relying on it. Cadence remains very low, with a five-year gap between 0.1.5 and 0.1.6.
Prediction
Absorbing stat_stepribbon() directly suggests further vendoring of the plotting layer rather than new statistical functions. The entries do not indicate which rolling statistics, if any, are queued next.

Recent moves

  1. 0y ago

    stat_stepribbon vendored in, plus na.pad on all rolling functions

    Brings stat_stepribbon() in from ggalt rather than depending on it, adds the Entero dataset for lognormal examples, and gives every tbr_ rolling function an na.pad argument for short windows. The first release in years that adds rather than repairs.

    View source ↗
  2. 1y ago

    gm_mean_ci forwards na.rm and zero.propagate correctly

    gm_mean_ci() now actually forwards na.rm and zero.propagate to gm_mean(), with tidyselect compatibility and documentation anchors alongside. An argument-passing correction rather than a change in method.

    View source ↗
  3. 6y ago

    Fix internals broken by tibble 3.0.0 subassignment

    Repairs internal functions broken by tibble 3.0.0's subassignment changes. Pure upstream compatibility, contributed by pull request.

    View source ↗
  4. 6y ago

    Date windows recomputed with intervals and periods

    After lubridate redefined year and month durations as 365.25-day units, tbrf switched to date intervals and periods for window calculation. Framed as a bug fix, but it changes how every time window is bounded and therefore what the rolling results are.

    View source ↗