feat: advertise 'All Categories' from cog_categories()
A reserved value nobody can discover is a trap, and this is the view the API's /categories endpoint is built from. Emitted for the two flow vocabularies only -- cog_balances() returns a stock and has no concept to sum within. Also fix test-categories.R to exclude pseudo-category rows from crosswalk-specific assertions (one row per (category, subtype) pair, non-empty item_codes, valid subtypes). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,10 @@ balance), `"spending"`, `"revenue"`, or `"balance"`.}
|
||||
\value{
|
||||
Tibble with columns `category`, `category_type`, `subtype`,
|
||||
`n_codes`, `item_codes` (comma-separated, alphabetical). Sorted by
|
||||
`category_type`, `category`, `subtype`.
|
||||
`category_type`, `category`, `subtype`. Includes one row per flow for the
|
||||
reserved pseudo-category `"All Categories"`, which carries `NA` for
|
||||
`subtype`, `n_codes` and `item_codes` because it is a query mode rather
|
||||
than a crosswalk entry — see [cog_spending()]'s `category` argument.
|
||||
}
|
||||
\description{
|
||||
Returns the category taxonomy exposed by the corpus's
|
||||
|
||||
Reference in New Issue
Block a user