% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/efo.R
\name{get_efo_economy}
\alias{get_efo_economy}
\title{Get EFO economy projections}
\usage{
get_efo_economy(
  measure = c("inflation", "labour", "output_gap"),
  refresh = FALSE,
  vintage = NULL
)
}
\arguments{
\item{measure}{Character. Which economy table to return. One of
\code{"inflation"}, \code{"labour"}, or \code{"output_gap"}. Defaults to
\code{"inflation"}.}

\item{refresh}{Logical. If \code{TRUE}, re-download even if a cached copy
exists. Defaults to \code{FALSE}.}

\item{vintage}{Optional EFO vintage label such as \code{"October 2024"}. If
supplied, the function downloads the file for that specific EFO. If
\code{NULL} (the default), the function uses any vintage set via \code{\link[=obr_pin]{obr_pin()}},
or falls back to the latest live EFO via the dynamic URL resolver.}
}
\value{
An \code{obr_tbl} with the standard v0.4.0 schema (columns:
\code{period}, \code{period_type}, \code{series}, \code{metric_type}, \code{value}, \code{unit}):
\describe{
\item{period}{Calendar quarter, e.g. \code{"2025Q1"} (character)}
\item{period_type}{Always \code{"quarter"} for this function (character)}
\item{series}{Variable name, e.g. \code{"CPI"} (character)}
\item{metric_type}{One of \code{"index"}, \code{"yoy_pct"}, \code{"pct"}, \code{"level"},
classified from the series name. This is the v0.4.0 fix for the v0.3.x
issue where, e.g., CPI Index values and CPI YoY values shared a single
\code{value} column with no machine-readable distinction.}
\item{value}{Numeric value in units described by \code{unit}}
\item{unit}{One of \code{"index"}, \code{"pct"}, etc., paired with \code{metric_type}}
}
}
\description{
Downloads (and caches) the OBR \emph{Economic and Fiscal Outlook} Detailed
Forecast Tables - Economy file and returns quarterly economic projections
for a chosen measure in tidy long format.
}
\details{
Data run from 2008 Q1 through the current forecast horizon. Use
\code{\link[=list_efo_economy_measures]{list_efo_economy_measures()}} to see all available measures.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({
  inf <- get_efo_economy("inflation")
  inf[inf$series == "CPI", ]

  lab <- get_efo_economy("labour")

  # Compare CPI projections from two different EFOs
  inf_oct24 <- get_efo_economy("inflation", vintage = "October 2024")
  inf_mar26 <- get_efo_economy("inflation", vintage = "March 2026")
})
options(op)
}

}
\seealso{
Other EFO: 
\code{\link{get_efo_fiscal}()},
\code{\link{get_efo_table}()},
\code{\link{get_monthly_profiles}()},
\code{\link{list_efo_economy_measures}()},
\code{\link{obr_efo_catalogue}()}
}
\concept{EFO}
