
Generate a country prioritization workbook
generate_GSAP_ctry_prioritization.RdCalculate the GPSAP country-prioritization indicators and weighted scores using the package KPI calculations for AFP, ES, and detection timeliness. Population-immunity data are supplied explicitly because they are not part of the POLIS download.
Usage
generate_GSAP_ctry_prioritization(
raw_data,
start_date,
end_date,
immunity_data,
risk_table = NULL,
lab_locs = NULL,
regional_classification = NULL,
proposed_category = NULL,
ctry_sf = NULL,
category_breaks = NULL,
min_surv_ind = 4,
include_all_countries = FALSE,
output_path = NULL,
positive_end_date = Sys.Date(),
lab_data = NULL
)Arguments
- raw_data
listOutput ofget_all_polio_data(). The data must be supplied by the calling template; this function does not download or save a separate POLIS R data file.- start_date
Dateor date-like string. Start of the analysis period.- end_date
Dateor date-like string. End of the analysis period.- immunity_data
tibbleCountry-level immunity data. It must containCountry(orcountry) and eitherzero.dose.pct,under.immun.pct, andno.ipv1.pct, ordtp1.pct,dtp3.pct, andipv1.pct.- risk_table
tibblePrevious country-priority table. It must containCountryandSG Priority Level. Defaults to the country-risk table retrieved from EDAV usingCTRY_RISK_CAT.- lab_locs
tibbleLaboratory-location data. Defaults to the package data source whenNULL.- regional_classification
tibbleOptional table withCountryand a column namedRegional classification.- proposed_category
tibbleOptional table withCountryand eitherProposed GPSAP 2025-26 prioritizationorSG Priority Level.- ctry_sf
sfOptional country spatial data used for proximity to virus detections. If omitted,raw_data$global.ctryis used when present.- category_breaks
numericOptional named thresholds for assigning a proposed category from the total score. Names must includeHIGH,MEDIUM, andLOW (WATCHLIST).- min_surv_ind
integerMinimum number of available surveillance indicators required for a complete score. Defaults to4.- include_all_countries
logicalRetain every country present in the AFP data, even when it has fewer thanmin_surv_indindicators. Such countries receiveinsufficient datafor the affected scores. Defaults toFALSE.- output_path
strOptional path for an Excel output. IfNULL, no file is written.- positive_end_date
DateDate used as the end of the six- and twelve-month positive-detection and proximity windows. Defaults toSys.Date().- lab_data
tibbleOptional cleaned laboratory data containingDateStoolReceivedinLab. When supplied, this date is used for the C2 onset-to-laboratory timeliness indicator.