% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/public_finances.R
\name{get_public_finances}
\alias{get_public_finances}
\title{Get all Public Finances Databank aggregates}
\usage{
get_public_finances(refresh = FALSE)
}
\arguments{
\item{refresh}{Logical. If \code{TRUE}, re-download even if a cached copy exists.
Defaults to \code{FALSE}.}
}
\value{
An \code{obr_tbl} (a \code{data.frame} with attached provenance) 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}{Fiscal year (character, e.g. \code{"2024-25"})}
\item{period_type}{Always \code{"fiscal_year"} for this function}
\item{series}{Series name (character)}
\item{metric_type}{Usually \code{"level"}; ratio or index series get a more
specific value derived from the series name}
\item{value}{Numeric value in units described by \code{unit}}
\item{unit}{Usually \code{"gbp_bn"}; ratios and indices override}
}
Use \code{\link[=obr_provenance]{obr_provenance()}} to extract source URL, vintage, and retrieval time.
}
\description{
Downloads (and caches) the OBR Public Finances Databank and returns all
aggregate fiscal series in tidy long format. Covers outturn from 1946-47
and OBR projections through the current forecast horizon.
}
\details{
Series include: Public sector net borrowing, Public sector net debt, Total
managed expenditure, Public sector current receipts, Nominal GDP, GDP
deflator, and more.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({
  pf <- get_public_finances()
  unique(pf$series)
  obr_provenance(pf)
})
options(op)
}

}
\seealso{
Other public finances: 
\code{\link{get_expenditure}()},
\code{\link{get_psnb}()},
\code{\link{get_psnd}()},
\code{\link{get_receipts}()}
}
\concept{public finances}
