Transforms raw budget data into a long-format intermediate representation: one row per (classroom x category_detail x source_type). Also produces reconciliation totals for validation.
Arguments
- raw
An
alprek_budget_rawobject frombudget_read().- category_groups
Optional tibble with
category_detailandcategory_groupcolumns. Defaults to the package codebook.- tolerance
Numeric. Dollar tolerance for reconciliation diagnostics. Default is
1.00.
Value
An alprek_budget_long S3 object (list) with elements:
long: tibble in long format with budget amounts.totals: tibble with reconciliation diagnostics per classroom.meta: list of metadata.
Examples
if (FALSE) { # \dontrun{
raw <- budget_read("rptClassBudgets 2023-2024.xlsx", "2023-2024")
cleaned <- budget_clean(raw)
cleaned$long # long format data
cleaned$totals # reconciliation diagnostics
} # }