reviser

R package to study revision patterns in time series

https://github.com/p-wegmueller/reviser

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R package to study revision patterns in time series

Basic Info
Statistics
  • Stars: 5
  • Watchers: 4
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%" 
)
```

# reviser 


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/p-wegmueller/reviser/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/p-wegmueller/reviser/actions/workflows/R-CMD-check.yaml)
[![pkgcheck](https://github.com/p-wegmueller/reviser/workflows/pkgcheck/badge.svg)](https://github.com/p-wegmueller/reviser/actions?query=workflow%3Apkgcheck)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![reviser status badge](https://marcburri.r-universe.dev/badges/reviser)](https://marcburri.r-universe.dev/reviser)
[![Codecov test coverage](https://codecov.io/gh/p-wegmueller/reviser/graph/badge.svg)](https://app.codecov.io/gh/p-wegmueller/reviser)


**reviser** is an R package designed for working with time-series vintages data. The package provides tools to clean, visualize, and analyze time-series revisions.

## Why reviser?

Economic data often arrives in multiple waves—with initial estimates updated or revised as more complete information becomes available (See the vignette [**the role and importance of revisions**](https://p-wegmueller.github.io/reviser/articles/literature-review.html)). These revisions, while common, can have major implications for how economic conditions are perceived and how decisions are made by policymakers, analysts, and markets. Yet, tools to systematically analyze, visualize, and communicate these revisions are still limited. This is where the R package **reviser** comes in.

**reviser** is built to support transparent, reproducible workflows for tracking and interpreting data revisions. Whether you're evaluating GDP estimates, inflation statistics, or high-frequency indicators, **reviser** helps quantify how vintages evolve, assess their reliability, and highlight cases where revisions may alter the economic narrative.

### Real-world relevance
The importance of revisions isn’t just academic. They shape real-world outcomes:

![Revision paths for Euro Area GDP (Sources: BEA, Eurostat)](man/figures/gdp_over_time.jpeg)

 - US GDP 2015-Q1 --- Weather or Weakness?: A sharp downward revision from +0.1% to -0.2% sparked fears of a slowdown—until a later benchmark revision lifted it back to +0.8%, highlighting challenges in seasonal adjustment.
 
 - Euro Area GDP in 2012Q1 --- A Recession Delayed?: A flash estimate of 0.0% avoided the recession label—until it was revised to -0.1%, confirming back-to-back contractions and altering the policy discussion at a critical time.

These examples underscore how even small numerical changes can shift narratives, delay responses, and affect credibility. 

**reviser** is an R package designed to streamline the analysis and visualization of data revisions—especially in the context of official statistics and macroeconomic indicators. Built with tidy principles and seamless integration in mind, reviser offers intuitive tools to compare data vintages, quantify revision patterns, and produce publication-ready outputs. Whether you're tracking GDP estimate updates or evaluating forecast accuracy over time, **reviser** provides a robust and flexible framework tailored for economists, data analysts, and statistical agencies alike.

The **reviser** package provides a comprehensive toolkit for analyzing data revisions — crucial for anyone working with real-time data. It allows users to **visualize**, **analyze**, and **evaluate** the impact of data updates across different release vintages, helping to understand and analyze revision patterns. 

Get started:
  
  - Structure your data according to **reviser conventions**. See the [*get started*](https://p-wegmueller.github.io/reviser/articles/reviser.html) vignette
                                                                                                                                            
Key features include:

  - **Calculate revisions** across vintages using [`get_revisions()`](https://p-wegmueller.github.io/reviser/reference/get_revisions.html). See the vignette [*Understanding Data Revisions*](https://p-wegmueller.github.io/reviser/articles/understanding-revisions.html) to learn how to structure and compute revision tables.
  
  - **Analyze revision patterns** and evaluate revision accuracy and bias using [`get_revision_analysis()`](https://p-wegmueller.github.io/reviser/reference/get_revision_analysis.html). For more, read the vignette [*Revision Patterns and Statistics*](https://p-wegmueller.github.io/reviser/articles/revision-analysis.html).
  
  - **Detect the first efficient release**, i.e., the earliest vintage that closely matches the final values, with [`get_first_efficient_release()`](https://p-wegmueller.github.io/reviser/reference/get_first_efficient_release.html). See the vignette [*Efficient Release Identification*](https://p-wegmueller.github.io/reviser/articles/efficient-release.html).
  
  - **Nowcast future data revisions** using [`kk_nowcast()`](https://p-wegmueller.github.io/reviser/reference/kk_nowcast.html), a tool to anticipate upcoming changes to early releases. Explore the methodology in the vignette [*Nowcasting Revisions*](https://p-wegmueller.github.io/reviser/articles/nowcasting-revisions.html).
                                                                                                                                                                                                                                                     

## Installation

You can install the development version of reviser from [GitHub](https://github.com/) with:

```{r, eval = FALSE}
# Install the reviser package
remotes::install_github("p-wegmueller/reviser")
```


## Usage
The following example analyzes GDP data revisions for the United States by 
transforming the data into a format suitable for vintage analysis, visualizing 
revisions during the financial crisis, and assessing how early estimates compare
to the final release. It then identifies the point at which the estimates become
stable and reliable.
```{r, eval = TRUE, warning=FALSE, message=FALSE}
library(reviser)
library(dplyr)

gdp <- gdp %>% 
  filter(id == "US") %>%
  tsbox::ts_pc() %>% 
  tsbox::ts_span(start = "1980-01-01")

gdp_wide <- vintages_wide(gdp)

gdp_long <- vintages_long(gdp_wide, keep_na = FALSE)

plot_vintages(
  gdp_long %>% 
  filter(
    pub_date >= as.Date("2009-01-01") & pub_date < as.Date("2010-01-01"),
    time < as.Date("2010-01-01") & time > as.Date("2008-01-01")
    ),
  type = "line",
  title = "Revisions of GDP during the financial crisis",
  subtitle = "qoq growth rates")
  
final_release <- get_nth_release(gdp_long, n = 10)

df <- get_nth_release(gdp_long, n = 0:6)

summary <- get_revision_analysis(df, final_release)
print(summary)

efficient_release <- get_first_efficient_release(df, final_release)
summary(efficient_release)
```

## Comparison to [`rjd3revisions`](https://rjdverse.github.io/rjd3revisions/)
The `reviser` package sets itself apart from `rjd3revisions` not only through its focus on advanced analysis of efficient releases and nowcasting performance, but also in its pure R implementation, which avoids external dependencies. In contrast, `rjd3revisions` relies heavily on Java via the JDemetra+ platform, which can make setup and integration more complex. `reviser` offers a lightweight, R-native solution for revision analysis, combining user-friendly tools for data wrangling, visualization, and evaluation of release efficiency.

## Contributing
Contributions are encouraged and appreciated. If you're uncertain about opening a pull request, consider starting with an issue to discuss your proposal. For more information, please refer to [CONTRIBUTING](https://p-wegmueller.github.io/reviser/CONTRIBUTING.html).

Please note that the reviser project is released with a [Contributor Code of Conduct](https://p-wegmueller.github.io/reviser/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

## Citation
Burri M, Wegmueller P (2025). reviser: Tools for Studying Revision Properties in Real-Time Time Series Vintages. R package version 0.1.0, https://p-wegmueller.github.io/reviser/.

Owner

  • Name: Philipp Wegmueller
  • Login: p-wegmueller
  • Kind: user
  • Location: Bern
  • Company: SECO

Ph.D. in Economics, Focus Applied Macroeconomics Interests in Forecasting and Applied TIme Series Econometrics

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "reviser",
  "description": "Provides tools to analyze revision properties in real-time time series data.",
  "name": "reviser: Tools for Studying Revision Properties in Real-Time Time Series Vintages",
  "codeRepository": "https://p-wegmueller.github.io/reviser/",
  "issueTracker": "https://github.com/p-wegmueller/reviser/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.1.0.9000",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.4.0 (2024-04-24)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Marc",
      "familyName": "Burri",
      "email": "marc.burri91@gmail.com",
      "@id": "https://orcid.org/0000-0001-8974-9090"
    },
    {
      "@type": "Person",
      "givenName": "Philipp",
      "familyName": "Wegmueller",
      "email": "philipp.wemueller@seco.admin.ch"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Person",
      "givenName": "Marc",
      "familyName": "Burri",
      "email": "marc.burri91@gmail.com",
      "@id": "https://orcid.org/0000-0001-8974-9090"
    },
    {
      "@type": "Person",
      "givenName": "Philipp",
      "familyName": "Wegmueller",
      "email": "philipp.wemueller@seco.admin.ch"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Marc",
      "familyName": "Burri",
      "email": "marc.burri91@gmail.com",
      "@id": "https://orcid.org/0000-0001-8974-9090"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "tsbox",
      "name": "tsbox",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tsbox"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=purrr"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "magrittr",
      "name": "magrittr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=magrittr"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "car",
      "name": "car",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=car"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "sandwich",
      "name": "sandwich",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=sandwich"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "systemfit",
      "name": "systemfit",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=systemfit"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "calculus",
      "name": "calculus",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=calculus"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "rlang",
      "name": "rlang",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rlang"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "scales",
      "name": "scales",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=scales"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "tibble",
      "name": "tibble",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tibble"
    },
    "13": {
      "@type": "SoftwareApplication",
      "identifier": "glue",
      "name": "glue",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=glue"
    },
    "14": {
      "@type": "SoftwareApplication",
      "identifier": "lubridate",
      "name": "lubridate",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lubridate"
    },
    "15": {
      "@type": "SoftwareApplication",
      "identifier": "KFAS",
      "name": "KFAS",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=KFAS"
    },
    "SystemRequirements": null
  },
  "fileSize": "NAKB"
}

GitHub Events

Total
  • Issues event: 6
  • Watch event: 5
  • Member event: 1
  • Issue comment event: 6
  • Push event: 48
  • Fork event: 2
Last Year
  • Issues event: 6
  • Watch event: 5
  • Member event: 1
  • Issue comment event: 6
  • Push event: 48
  • Fork event: 2

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgcheck.yaml actions
  • ropensci-review-tools/pkgcheck-action main composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v5 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • KFAS * imports
  • calculus * imports
  • car * imports
  • dplyr * imports
  • ggplot2 * imports
  • glue * imports
  • lubridate * imports
  • magrittr * imports
  • rlang * imports
  • sandwich * imports
  • scales * imports
  • systemfit * imports
  • tibble * imports
  • tidyr * imports
  • knitr * suggests
  • purrr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • tsbox * suggests