Files
uscogdata/man/cog_explain.Rd
T
Claude 19b5b02d2f docs: render the roxygen markdown the reference pages are written in
The roxygen comments use markdown (**bold**, `code`, [cog_x()] links,
bullet lists) but DESCRIPTION had no `Roxygen: list(markdown = TRUE)`,
so the generated .Rd files carried that syntax literally. It also meant
a bare `%` started an Rd comment and silently cut the rest of its line
from seven places in the rendered pages, including "7% of the no-filter
floor", "-32.7% to +251.0% across 24 years" and the `filter(role %in%
...)` line of cog_peer_compare()'s example.

Adds the setting and regenerates man/ with roxygen2 7.3.3 (matching
RoxygenNote). The only source change is escaping one literal
"[min year, max year]" in an @noRd block in R/balance_caveats.R, which
markdown mode otherwise reads as a link. No wording or code changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
2026-11-04 20:21:24 +00:00

55 lines
2.3 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/explain.R
\name{cog_explain}
\alias{cog_explain}
\title{Explain a verb result's provenance}
\usage{
cog_explain(result, format = c("print", "list"))
}
\arguments{
\item{result}{A tibble returned by a \verb{cog_*} verb.}
\item{format}{\code{"print"} (default) for a human-readable cli summary;
returns \code{result} invisibly for chaining. \code{"list"} returns the raw
provenance list (identical to \code{attr(result, "provenance")}).}
}
\value{
Either \code{result} (invisibly) or the provenance list.
}
\description{
Prints the structured provenance attached to a tibble returned by any
\verb{cog_*} verb, or returns it as a list for downstream use (MCP tools,
dashboards, JSON export).
}
\section{Two kinds of series break}{
Catalogued breaks reach you without being asked for, in two disjoint
fields, because a caveat about one series and a caveat about the whole
corpus are different claims:
\itemize{
\item \strong{\code{series_break_refs}} — breaks matched against the item codes actually
present in this result. A break in one code you queried.
\item \strong{\code{corpus_break_refs}} — breaks catalogued with \code{fin_code = "ALL"},
which are statements about the corpus rather than about any one code:
dollar precision across the 1976/1977 boundary (\code{SB085}), imputation
exclusion from FY2002 (\code{SB087}), the FY2012 dense-to-sparse
representation change (\code{SB194}), and the FY2017 government-identifier
change (\code{SB086}). These are selected on the break-year window alone.
}
\code{SB194} is the one most likely to matter: a query spanning FY2011 to FY2012
crosses the boundary where an absent cell stops meaning "Census published
$0" and starts meaning "not reported".
}
\section{Other provenance blocks}{
\code{transformations$units_conversion} records the \verb{$1,000s}-to-dollars
multiply that every amount column has already had applied.
\code{transformations$per_capita} records the population denominator and its
year range. \code{coverage} and \code{coverage_mode} appear on multi-government
results (see \code{\link[=cog_geographic_rollup]{cog_geographic_rollup()}}). \code{completion} appears when
\code{complete = TRUE}. \code{balance_caveats} appears on \code{\link[=cog_balances]{cog_balances()}} results.
}