Tidy Data and Workflow Layer for Epidemic Nowcasting
Overview
Defines tidy data structures and package-agnostic workflows for epidemiological nowcasting. The 'tbl_now' class records event, report, and revision dates alongside strata, covariates tagged by model component, censoring, and reporting-delay metadata while remaining compatible with 'dplyr'. Tools support validation, manipulation, diagnostics, visualization, format conversion, retrospective evaluation, and multiple modelling engines. The 'tbl_nowcast' class standardizes probabilistic predictions for plotting, scoring, comparison, and ensembling.
Breaking: calendar effects follow the calendar (#99)
temporal_effects(week_of_year = TRUE), month_of_year = TRUE and seasons
were coded relative to the data rather than the calendar: the week and month
were offsets from the date in the object's **first row** (so January was month
3 for data starting in November, and the code even depended on row order), and
the Fourier terms counted time from the earliest event date. The same calendar
week therefore got a different code in every series, stratum and backtest
window, and a coefficient labelled "week 7" was not epiweek 7.
Now, on every date axis:
month_of_yearis the calendar month: a factor with levels1(January) to12(December).week_of_yearis the MMWR epidemiological week, [lubridate::epiweek()]: a factor with levels1to53. Week 53, which only some years have, keeps a level of its own instead of being folded into another week.
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
seasonscount time from 1970-01-01 in the data's units, so a date gets the same sine and cosine values whatever the first date of the series. Fourier terms for report dates are still counted in the event units, as before. A numeric (non-date) axis has no calendar and still counts from its first event.
Column names are unchanged, but their values change, so models refitted with
these effects code them differently. A model's fit with Fourier seasons
alone is unaffected in principle -- shifting the phase rotates the sine and
cosine pair onto the same span -- while models with week_of_year or
month_of_year now use January / epiweek 1, rather than the first period in
the data, as the reference level. tbl_now_to_epinowcast() derives the
effects on its completed grid from the calendar too, so its values match
compute_temporal_effects() wherever the grid starts.
add_temporal_effects.data.frame() no longer needs numeric_col for seasons on
a date column (an explicit numeric_col still takes precedence) and gains
season_units, the units the Fourier periods are counted in.
nowcast_ensemble() can take the median (#100)
nowcast_ensemble(type = "median") combines the members' predictive quantiles
by their median, level by level, as the COVID-19 and FluSight forecast hubs'
quantile median ensembles do. One outlying member cannot drag it the way it
drags the average (type = "quantile"). The weights still apply: any weights
other than "equal", including "inverse_score" and "optim" from a
backtest, give a weighted median. With two equally weighted members the median
equals the average, so it needs three or more to differ.
epidist comes from CRAN
epidist in Suggests is now >= 1.0.0, its first CRAN release, so it
installs without an extra repository. tidy.epidist_fit() uses the interface
that epidist 0.5.0 introduced, delay_parameter_draws() and
add_summaries(), in place of the removed predict_delay_parameters() and
add_mean_sd(), which had made tidy() fail on every fit and R CMD check
warn about missing objects. Because the new draws carry every column of the
model data, all numeric, the reported terms are taken from the fit's family
(mu and sigma for a lognormal, say) plus mean and sd, rather than from
whatever numeric column is left after dropping a list of bookkeeping names.
baselinenowcast in Suggests is relaxed to >= 0.2.0, the version on CRAN.
diagnose() reports fractional delays under units / delay again
1.1.0 accidentally moved the fractional-.delay finding of diagnose() and
validate_tbl_now() from scope "delay" to "report". It is back under
"delay".
From NEWS.md in the release
Install
Health
NOTERd cross-referencesr-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-patched-linux-x86_64
Packages unavailable to check Rd xrefs: ‘diseasenowcasting’, ‘epinowcast’ Unknown package ‘almanac’ in Rd xrefs
- NOTE10 OK, 3 NOTENow
- NOTE11 OK, 2 NOTE2026-10-22
- WARNING12 OK, 1 WARNING2026-10-01
- OK5 OK2026-09-22
Documentation
The repository also keeps web-only articles.
- Help pages
- 91 (3 internal)includes a package overview page
- Examples that run
- 100%87 run in a plain check (22 of them under a condition)
- Exported functions with examples
- 98%
- Documented parameters
- 93%
- Return-value docs
- 98%
- Help pages citing references
- 7%
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- 3
- Median days to close, 50 most recently updated closed PRs
- 0
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/rodrigozepeda/tbl.now on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows
GitHub Pages site last deployed 2026-10-16 · The repository has a site deploy workflow
pkgdown site last built 2026-10-16
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-04-26Named in .Rbuildignore: .claudePull request it wrote: opened by a project memberCommits: 4 by its own account · at least 44 crediting it in the message
- GitHub Copilotfirst seen 2026-08-21Commits: at least 3 crediting it in the message
- Claude Opus 535 commits · Aug to Sep 2026
- Claude Sonnet 5.54 commits · Sep 2026
- Claude Opus 5.52 commits · Oct 2026
- Claude Opus 4.81 commit · Jul 2026
- Claude Sonnet 4.61 commit · Apr 2026
1 more model not listed.
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.2.0Latest2026-10-16 · current release · diff ↗ ··
added 16 exports
add_event_covariates, add_report_covariates, add_revision_covariates, backtest_combine, change_event_covariates, change_report_covariates, change_revision_covariates, get_event_covariates, get_report_covariates, get_revision_covariates, remove_all_event_covariates, remove_all_report_covariates, remove_all_revision_covariates, remove_event_covariates, remove_report_covariates, remove_revision_covariateslisted once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-16 17:07 UTC, so it stayed less than the time between readings. - 1.0.02026-09-21
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-21
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Additional repositories
- epinowcast.r-universe.dev, davisvaughan.r-universe.dev, rodrigozepeda.r-universe.dev
- Minimum R
- ≥ 4.2.0
- Bundled data
- 630 KB / 7 files
- Download size
- 2.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("tbl.now")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.