Skip to content

baselinenowcast

0.2.0Package record

Baseline Nowcasting for Right-Truncated Epidemiological Data

0packages dependsuggested by 1
2.8Kdownloads / year
90.7%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.2.0

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. Use estimate_and_apply_delay() instead, which now supports optional delay estimation via the delay_pmf parameter (#334).
  • fill_triangles() has been removed. Use estimate_and_apply_delays() instead (#334).
  • Rename truncate_triangle() to truncate_to_row() and truncate_triangles() to truncate_to_rows() to clarify that these functions truncate by row count and distinguish them from other truncation utilities such as truncate_to_quantile() and truncate_to_delay() (#336).
  • Use the as_reporting_triangle and baselinenowcast workflow in the vignette which walks through a nowcasting example applied to syndromic surveillance data in the U.S.
  • Add preprocess parameter to estimate_delay() to control handling of negative values in reporting triangles. Set to preprocess_negative_values by default to redistribute negative values to earlier delays, or set to NULL to 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 a baselinenowcast_df object.
  • Add converters between reporting_triangle and ChainLadder triangle formats via as_ChainLadder_triangle() and as_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 a reporting_triangle object and produces a baselinenowcast_df object 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 a reporting_triangle object, which will be used as an input to the eventual baselinenowcast() 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 baselinenowcast to 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_uncertainty to 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

CRAN checks
13OK
Slowest check: 9.7 min · r-oldrel-macos-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 728 wordsVignettesYes · 5 · dynamicNEWSYes · 100% structured · mentions 0.2.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
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

2.8K
CRAN downloads in the past year
Rank #7,362 · ~8/day · ~232/mo
Daily download trend is not available in this view yet.
65430 days
1.2K90 days
2.8K1 year
Compare downloads with other packages →
Also on118 r2u26 autocran

Repository

11Stars
2Forks
62Open issues
3Open PRs
4Releases
1,639Commits
9Commit identities
1,639 commits · Last activity 2026-07-22 · +10% stars, 30d · Default branch at 0.2.1000, ahead of CRAN 0.2.0 (checked 2026-10-21) · Discussions: 5 posts
Responsiveness
How these are sampled
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

2025-08-22 · 72026-09-30 · 11
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows

Governance and community (3)
Code of conduct (inherited from epinowcast)Contributing guide (inherited from epinowcast)PR template (inherited from epinowcast)
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-07-22 · The repository has a site deploy workflow

pkgdown site last built 2026-07-22

Coverage (1)
Coverage reporting
Show all practicesHide 5 practices
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Research and citation (2)
CITATION.cffcodemeta.json
Automation and maintenance (1)
pre-commit
Lint, format, editor (2)
lintrLint workflow
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2025-05-19
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude, CLAUDE.md
    Pull request it wrote: opened by a project member
    Commits: at least 4 crediting it in the message
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
20 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 4.1.0
Imports (6)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (6)
Author, Maintainer since 0.2.0 (2026), Copyright holder
Author
Contributor
Releases (1)
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.0Latest
    2026-02-03 · current release
  • R
    R 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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for baselinenowcast version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy