
Bay segment table of allocation assessment by entity and facility
Source:R/show_aaassess.R
show_aaassess.RdBay segment table of allocation assessment by entity and facility
Arguments
- aa_data
data frame returned by
anlz_aacalled withannavg = TRUE- bay_seg
integer bay segment identifier, one of
1(Old Tampa Bay),2(Hillsborough Bay),3(Middle Tampa Bay),4(Lower Tampa Bay), or55(Remaining Lower Tampa Bay).- digits
numeric indicating decimal precision for the Allocated Tons and Effective Load columns. Default
1. Allocation % is always shown to two decimal places with a percent sign, independent ofdigits.- family
chr string indicating font family for text labels
- txtsz
numeric indicating font size
Value
A flextable object with one row per
facility/source nested under its owning entity, and a bolded "Total" row
for any entity with more than one facility/source in bay_seg.
Details
Rows are organized by Entity. An entity's block gathers every row that
applies to it in bay_seg regardless of source (e.g. an entity
with both IPS and Material Losses facilities gets one combined block and
one combined Total).
Facility column: The displayed Facility text combines
facname and source: IPS rows show facname as-is;
DPS rows append " (end of pipe)" or
" (reuse)"; Material Losses rows append " (Material
Losses)"; MS4 rows (no facname) show "MS4".
Entity Total row: a "unit" is either one shared group or one
standalone facility/entity row. An entity gets a bolded "Total" row
when it has more than one unit (regardless of how many display rows those
units span), summing alloc_tons/eff_load_tons once per
unit. Entities with exactly one unit (every MS4 row, and
any entity with only one facility) get no Total row. Allocation % is left
blank on the Total row.