% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reconcile.R
\name{cer_reconcile}
\alias{cer_reconcile}
\title{Reconcile an aggregate against the QCMR headline figure}
\usage{
cer_reconcile(value, quarter, measure, sum_column = NULL, warn_pct = 0.02)
}
\arguments{
\item{value}{Numeric scalar or data frame. If a data frame, pass
\code{sum_column} to pick which numeric column to sum.}

\item{quarter}{Character, e.g. \code{"2024-Q4"} or \code{"2023-24"}.}

\item{measure}{Character, matching a \code{measure} value in
\code{\link[=cer_qcmr_reference]{cer_qcmr_reference()}}. For example
\code{"accu_cumulative_issuances"},
\code{"safeguard_covered_emissions_mt"}, \code{"smc_issuances"}.}

\item{sum_column}{Column name to sum when \code{value} is a data frame.}

\item{warn_pct}{Warn if |pct_diff| > this threshold. Default 0.02.}
}
\value{
A one-row data frame: \code{measure}, \code{quarter}, \code{value},
\code{reference}, \code{diff}, \code{pct_diff}, \code{unit}, \code{source}.
}
\description{
Compares a scalar or data-frame sum against the CER Quarterly
Carbon Market Report headline for the same quarter and measure.
Warns on absolute percentage gap > 2\% (default). Small gaps
(sub-1\%) are expected because ACCU project registers are
retroactively revised between QCMR releases.
}
\examples{
cer_reconcile(value = 185e6,
              quarter = "2024-Q4",
              measure = "accu_cumulative_issuances")
}
\references{
Clean Energy Regulator (quarterly). \emph{Quarterly Carbon Market
Report}. \url{https://cer.gov.au/markets/reports-and-data/quarterly-carbon-market-reports}
}
\seealso{
Other reconciliation: 
\code{\link{cer_qcmr_reference}()}
}
\concept{reconciliation}
