
Country-Level Population Surveillance Table (wide, multi-year)
generate_pop_tab_ctry.RdBuilds a formatted table of country-level surveillance indicators across a span of years. It aggregates inputs to the country–year level, computes year-over-year differences in NP-AFP case counts, pivots to a wide layout (one row per country; columns per year), and applies target-based highlighting for NPAFP rate < 2 and stool adequacy < 80%.
Arguments
- cnpafp
tibbleOutput off.npafp.rate.01()at the country level.- cstool
tibbleOutput off.stool.ad.01()at the country level.- start_date, end_date
Dates (any format coercible by
lubridate::as_date()) defining the inclusive year range to display. All years betweenyear(start_date)andyear(end_date)are included.
Value
A flextable object suitable for viewing in the RStudio Viewer
(e.g., with flextable::save_as_html() + rstudioapi::viewer()), or
exporting to Word/PowerPoint/HTML via flextable.