The package is used to create the data output that underlies the ICPI Partner Progress Reports (PPRs) which are generated twice a quarter (initial and post-cleaning). Historically, the data was created in Stata and required slight tweaks every quarter. Starting with FY18Q1, the scripts were converted into a automated package. The output is then used to populate an Excel template via VBA and the reports are then posted to PEPFAR Sharepoint.
- Install the package
#install
install.packages("devtools")
library("devtools")
install_github("achafetz/PartnerProgress")
- Setup folder - Clone this repository to your local machine to have most of the folder structure and some data. Download the current ICPI MER Structured PSNUxIM dataset from the Data Store on PEPFAR Sharepoint. You will need to convert it to an RDS file prior to running this package.
#convert Fact Viewv from .txt to .RDS
read_msd("ICPI_MER_Structured_Dataset_PSNU_IM_20180323_v2_1.txt", path = "~/ICPI/Data")
#setup any missing folders
initialize_fldr("PartnerProgress", "~/GitHub", "RawData", "Documents", "R", "ExcelOutput")
- Create the PPR dataset - run the main script,
genPPR()from the package to create the underlying dataset that feeds into the template
#create global and OU output
genPPR("~/ICPI/Data")
#alternatively, you can just create a specific OU output
genPPR("~/ICPI/Data", output_global = FALSE, output_ctry_all = FALSE, output_subset_type = "ou", "Kenya")
#or just the global output
genPPR("~/ICPI/Data", output_ctry_all = FALSE)
===
Disclaimer: The findings, interpretation, and conclusions expressed herein are those of the authors and do not necessarily reflect the views of United States Agency for International Development, Centers for Disease Control and Prevention, Department of State, Department of Defense, Peace Corps, or the United States Government. All errors remain our own.