% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forecast_revisions.R
\name{get_forecast_revisions}
\alias{get_forecast_revisions}
\title{Get OBR forecast revisions}
\usage{
get_forecast_revisions(unit = c("gbp_bn", "pct_gdp"), refresh = FALSE)
}
\arguments{
\item{unit}{Character. Either \code{"gbp_bn"} (GBP billion, the default) or
\code{"pct_gdp"} (per cent of GDP).}

\item{refresh}{Logical. If \code{TRUE}, re-download even if a cached copy
exists. Defaults to \code{FALSE}.}
}
\value{
An \code{obr_tbl} with columns:
\describe{
\item{forecast_date}{Forecast vintage, e.g. \code{"November 2024"} (character).}
\item{component}{Revision component. Top-level rows are \code{"Total"},
\code{"Policy"}, \code{"Classifications and one-offs"}, and \code{"Underlying"}.
Sub-components carry the OBR's \code{"of which: ..."} labels (character).}
\item{fiscal_year}{Fiscal year being revised, e.g. \code{"2024-25"} (character).}
\item{value}{Revision value, in GBP billion or per cent of GDP per
\code{unit} (numeric). A positive value indicates an upward revision to
PSNB.}
}
}
\description{
Downloads (and caches) the OBR Forecast Revisions Database, which
decomposes each EFO-to-EFO revision in the headline Public Sector Net
Borrowing forecast into three top-level components - policy,
classifications and one-offs, and underlying (economic determinants) -
with sub-components for each.
}
\details{
This is the dataset behind the "what changed?" attribution charts in
OBR fiscal commentary and IFS Green Budget chapters.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({
  rev <- get_forecast_revisions()
  # Top-level revisions only
  rev[rev$component \%in\% c("Total", "Policy",
  "Classifications and one-offs", "Underlying"), ]
})
options(op)
}

}
\seealso{
Other forecasts: 
\code{\link{get_forecasts}()},
\code{\link{list_forecast_series}()},
\code{\link{obr_actual_vs_forecast}()},
\code{\link{obr_compare_vintages}()},
\code{\link{obr_forecast_panel}()}
}
\concept{forecasts}
