% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbl.R
\name{obr_provenance}
\alias{obr_provenance}
\title{Extract OBR provenance metadata}
\usage{
obr_provenance(x)
}
\arguments{
\item{x}{An \code{obr_tbl} (or any object; returns \code{NULL} if none attached).}
}
\value{
A named list of provenance fields, or \code{NULL} if no provenance is
attached. Fields:
\describe{
\item{publication}{Short code: \code{"PFD"}, \code{"HFD"}, \code{"EFO"}, \code{"WTR"}, \code{"FSR"}, \code{"PMD"}.}
\item{vintage}{Publication vintage label, e.g. \code{"March 2026"}.}
\item{source_url}{Canonical OBR download URL the data came from.}
\item{retrieved}{\code{POSIXct} timestamp of when the file was downloaded or
last validated in the cache.}
\item{file_md5}{MD5 fingerprint of the underlying spreadsheet.}
\item{package_version}{\code{obr} package version that produced the object.}
\item{notes}{Optional free-text notes, or \code{NULL}.}
}
}
\description{
Returns the provenance list attached to an \code{obr_tbl}: the OBR publication
it came from, the publication vintage, the source URL, retrieval time,
file fingerprint, and package version.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({
  psnb <- get_psnb()
  obr_provenance(psnb)
})
options(op)
}

}
\concept{provenance}
