test: prove 'All Categories' passes through the geographic rollup
Geographic totals are the expensive case cog-api#37 was filed about -- without this a caller issues one rollup per category and sums them. The pass-through was expected to work by construction; this asserts it rather than assuming it, including under per_capita and inflation adjustment.
This commit is contained in:
@@ -20,7 +20,11 @@ cog_geographic_rollup(
|
||||
`canonical_govid` values. At least one layer required.}
|
||||
|
||||
\item{category}{Single category name or character vector (passed through
|
||||
to [cog_spending()]).}
|
||||
to [cog_spending()]), or the reserved `"All Categories"` for one summed
|
||||
row per `(year, canonical_govid, subtype)` covering every category in the
|
||||
concept's scope. `"All Categories"` is the efficient way to build a
|
||||
geographic total: without it a caller must issue one rollup per category
|
||||
and sum the results themselves.}
|
||||
|
||||
\item{years}{Integer vector of years.}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user