feat: expenditure_concept = direct|total in cog_spending()

total adds an intergovernmental leg (M = to local, L = to state) as a UNION ALL
over new ig_annotated views. The IG leg deliberately skips NOT is_aggregate --
legacy IG lives almost entirely on aggregate rows, and the aggregate codes are
year-disjoint from their modern leaf components, so nothing double-counts.
L-- (the IG-to-state family total) is excluded. direct is the default and is
numerically unchanged.
This commit is contained in:
2026-07-27 09:28:17 -04:00
parent 7ed1da9b79
commit fefd4fe969
8 changed files with 208 additions and 8 deletions
+3 -1
View File
@@ -13,11 +13,13 @@
.harmonization_view_files <- c(
"22-spending_long_harmonized.sql",
"23-revenue_long_harmonized.sql",
"25-ig_long_harmonized.sql",
"33-harmonization_map.sql",
"34-harmonization_recipes.sql",
"35-series_breaks_pq.sql",
"42-spending_annotated_harmonized.sql",
"43-revenue_annotated_harmonized.sql"
"43-revenue_annotated_harmonized.sql",
"45-ig_annotated_harmonized.sql"
)
#' Register DuckDB views from inst/sql/ SQL files