
sirfunctions
sirfunctions.RmdHere are some of the core functions included in
sirfunctions with brief descriptions. The list is not
exhaustive, and many more functions are available to the users. Please
visit the package
website for full function specifications.
NOTE: Any functions getting data or those that interact with EDAV require authenticated connection to CDC EDAV resources.
Get Data
-
get_all_polio_data(): this is the primary function which loads all recent polio data. Parameters can be used to specify date ranges, data selection and user verification. -
sirfunctions_io(): perform key writing/reading/editing functions on EDAV and locally. -
load_clean_{resolution}_sp: ’resolution` can be dist, prov or ctry. Parameters can be used to specify date or spatial ranges as well as the output. -
init_dr(): this is the primary function to initialize the desk review analytic pipeline. This function handles folder organization and download of data for a specific country. Visualization functions in the desk review will be downloaded as well. -
init_kpi(): this function initializes the KPI analytic pipeline. Sets up the folder structure, downloads the global polio dataset, and links to the template for use in the analysis. -
explore_edav(): interactively navigate the Azure Storage Explorer environment.
Communications
-
send_teams_message(): send a message to a teams channel with attachments. -
upload_to_sharepoint(): upload a document to a sharepoint folder. -
send_outlook_email(): send an email from the validated microsoft account.
Key calculations
-
extract_country_data(): expects a list object that is generated byget_all_polio_data(). Filters the output ofget_all_polio_data()for a specific country or multiple countries. -
f.ev.rate.01(): calculate the enterovirus detection rate using CDC cleaned environmental surveillance data. -
f.npafp.rate.01(): calculate the non-polio (NP) acute flaccid paralysis (AFP) rate accounting for person-time at risk using CDC cleaned AFP data and appropriately matched population data. -
f.stool.ad.01(): calculate stool adequacy using CDC cleaned acute flaccid paralysis (AFP) data. -
f.timely.detection.01(): calculate the timeliness of detection of cases using CDC cleaned acute flaccid paralysis (AFP) data. -
f.timely.01(): calculate the timeliness of stool data using only epi data.
Visualization
-
create_emergence_group_gif(): function to visualize the spread of specific emegrence groups. -
generate_adhoc_map(): function to visualize recent polio outbreaks.
Helper functions
-
test_EDAV_connection(): Evaluates the speed of connection that users have with the CDC EDAV system. -
f.color.schemes(): Adds Standard color schemes used in figure creation by the SIR team. -
f.expand.bbox(): Expands a geographic bounding box generated for maps. -
f.metadata.tag(): Adds a tag using information from the CDC generated ‘raw.data’ file to ggplot and flextable objects. -
f.plot.looks(): Adds standard themes used in figure creation by the SIR team. -
duplicate_check(): checks for duplicates in the output ofget_all_polio_data(). -
check_afp_guid_ctry_data(): checks for GUIDS present in the AFP dataset but not in the population files. -
fix_ctry_data_missing_guids(): fixes unknown GUIDS in the AFP linelist by obtaining GUIDs found in the pop files based on province and district names for specific years. -
compress_png(): compress PNG files. Note: requires installation of the pngquant software. -
get_diff_cols(): get the columns where records differ in a group. Useful for identifying where duplicates differ.