
Calculate stool collection timeliness using only AFP data (DRAFT)
f.timely.01.RdCreates a table for timeliness by geographic unit including the
number of timely stool samples for each interval and percent timeliness. Currently,
the function will only work on ctry.data (output of extract_country_data()).
Usage
f.timely.01(
afp.data,
admin.data,
start.date,
end.date,
spatial.scale,
intervals.manual = F
)Arguments
- afp.data
tibbleAFP data which includes GUID at a given spatial scale formated asadm(0,1,2)guid, onset date asdate.- admin.data
tibbleFull list of country administrative units by a given spatial scale includingyear,adm(0,1,2)guid, andctry/prov/distas appropriate.- start.date
strStart date of the analysis formatted as"YYYY-MM-DD".- end.date
strEnd date of the analysis formatted as"YYYY-MM-DD".- spatial.scale
strSpatial scale to group analysis by. Valid values are: -"prov"Province level."dist"District level."ctry"Country level.
- intervals.manual
logicalShould user input their own timeliness interval requirements? Default isFALSE. This is only required if timeliness column such asnoti.7d.on,inv.2d.notiare not already calculated. This draft function will currently fail if this parameter is set toTRUE.
Details
This function is no longer maintained as it is not used in any of the analytic pipelines.
An equivalent function is generate_int_data(), which expands and simplifies this
function by also being able to take lab data to calculate lab timeliness intervals.
Examples
if (FALSE) { # \dontrun{
raw.data <- get_all_polio_data()
ctry.data <- extract_country_data("algeria", raw.data)
stool.summary <- f.timely.01(
ctry.data$afp.all.2, ctry.data$ctry.pop,
lubridate::as_date("2021-01-01"),
lubridate::as_date("2023-12-31"),
"ctry"
)
} # }