Baseline Nowcasting for Right-Truncated Epidemiological Data
Overview
Nowcasting right-truncated epidemiological data is critical for timely public health decision-making, as reporting delays can create misleading impressions of declining trends in recent data. This package provides nowcasting methods based on using empirical delay distributions and uncertainty from past performance. It is also designed to be used as a baseline method for developers of new nowcasting methods. For more details on the performance of the method(s) in this package applied to case studies of COVID-19 and norovirus, see our recent paper at https://wellcomeopenresearch.org/articles/10-614. The package supports standard data frame inputs with reference date, report date, and count columns, as well as the direct use of reporting triangles, and is compatible with 'epinowcast' objects. Alongside an opinionated default workflow, it has a low-level pipe-friendly modular interface, allowing context-specific workflows. It can accommodate a wide spectrum of reporting schedules, including mixed patterns of reference and reporting (daily-weekly, weekly-daily). It also supports sharing delay distributions and uncertainty estimates between strata, as well as custom uncertainty models and delay estimation methods.
This is the first stable release providing core functionality for producing probabilistic or point nowcasts from a dataframe with incident case counts indexed by reference dates and report dates. It supports doing so across multiple strata, either through creating reporting_triangle objects for each strata and nowcasting independently, or nowcasting directly from a dataframe containing multiple strata. The reporting_triangle object allows users to specify the unit of the delay, and provides helpful print and summary S3 methods, as well as functionality to truncate to a specific delay or a percentile of the observed delays. A paper validating and evaluating the performance of the methods is available at <https://wellcomeopenresearch.org/articles/10-614/v1>.
Package
fill_triangle()has been removed. Useestimate_and_apply_delay()instead, which now supports optional delay estimation via thedelay_pmfparameter (#334).fill_triangles()has been removed. Useestimate_and_apply_delays()instead (#334).- Rename
truncate_triangle()totruncate_to_row()andtruncate_triangles()totruncate_to_rows()to clarify that these functions truncate by row count and distinguish them from other truncation utilities such astruncate_to_quantile()andtruncate_to_delay()(#336). - Use the
as_reporting_triangleandbaselinenowcastworkflow in the vignette which walks through a nowcasting example applied to syndromic surveillance data in the U.S. - Add
preprocessparameter toestimate_delay()to control handling of negative values in reporting triangles. Set topreprocess_negative_valuesby default to redistribute negative values to earlier delays, or set toNULLto preserve negative PMF entries. This allows the method to work with reporting corrections that result in net downward adjustments at specific delays (#278). - Export
preprocess_negative_values()function to allow users to manually handle negative values in reporting triangles by redistributing them to earlier delays (#278). - Add a
baselinenowcast.data.frame()method which ingests a data.frame with one or more strata to nowcast and returns abaselinenowcast_dfobject. - Add converters between
reporting_triangleand ChainLadder triangle formats viaas_ChainLadder_triangle()andas_reporting_triangle.triangle(), enabling use of ChainLadder's mature claims reserving methods alongside baselinenowcast's nowcasting functionality. - Add a
baselinenowcast.reporting_triangle()method which ingests areporting_triangleobject and produces abaselinenowcast_dfobject which is a data.frame with nowcasts and associated metadata. - Add a
as_reporting_triangle()S3 method which ingests a data.frame or matrix and returns areporting_triangleobject, which will be used as an input to the eventualbaselinenowcast()function.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
- Add a vignette which demonstrates how to pre-process for nowcasting syndromic surveillance system data using the U.S. National Syndromic Surveillance Program (NSSP) data as a case study, and then use
baselinenowcastto nowcast cases of a specific syndromic surveillance definition. - Add intermediate-level grouping functions to generate a point nowcast from a reporting triangle and to take a point nowcast and estimate and apply uncertainty.
- Refactor
estimate_uncertaintyto take in an error model function, an aggregator function for aggregating across reference times, and an aggregator function for aggregating across delays.
Documentation
- Add a vignette which walks through the low-level function interface on the same nowcasting problem as in the Getting Started vignette.
- Modify the Getting Started vignette to use the
baselinenowcast()wrapper function. - Improve PMF validation message to be more informative when the delay PMF does not sum to approximately 1. The message now shows the actual sum and clarifies that this may be expected when working with downward corrections or incomplete data (#148, #278).
- Include the pre-print as well as the package in the citation.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-20
- ERROR12 OK, 1 ERROR2026-08-18
- OK13 OK2026-08-05
Show 2 earlier changesHide 2 earlier changes
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 105 (45 internal)
- Examples that run
- 100%49 run in a plain check (2 of them under a condition)
- Exported functions with examples
- 90%
- Documented parameters
- 96%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 87%
- Median days to close, 50 most recently updated closed issues
- 18
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
17 development-tooling and community-health practices detected across 9 families in the upstream repository
Checks run against github.com/epinowcast/baselinenowcast on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows
GitHub Pages site last deployed 2026-07-22 · The repository has a site deploy workflow
pkgdown site last built 2026-07-22
Show all practicesHide 5 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-05-19Named in .Rbuildignore: .claudeNamed in .gitignore: .claude, CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 4 crediting it in the message
Dependencies
Installing baselinenowcast adds 9 packages (8 with compiled code, 3.4 MB of source tarballs). Heaviest: vctrs 1.0 MB, rlang 766 KB, cli 629 KB.
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- 0.2.0Latest2026-02-03 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-02-03
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 34 KB / 5 files
- Download size
- 2.4 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("baselinenowcast")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.12688/wellcomeopenres.25027.1.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.