Closed gsarfaty closed 6 years ago
QC conducted against: MER_Structured_Dataset_OU_IM_FY17-18_20180622_v2_1. No issues found other than #6 which is now resolved.
1. OU x Agency x Indicator fy18 cumulative achievement -All OUs checked
2. OU x Agency x IM x Indicator fy18 cumulative achievement -Several OU x IMs checked
library(tidyverse) install.packages("devtools") devtools::install_github("ICPI/ICPIutilities") library(ICPIutilities) #import data df_OUxIM <- read_msd("MER_Structured_Dataset_OU_IM_FY17-18_20180622_v2_1.txt") #add fy18cum df_OUxIM <- df_OUxIM%>% filter(standardizeddisaggregate == "Total Numerator", fundingagency!= "Dedup") %>% add_cumulative() #results by agency df_OUxAgency <- df_OUxIM%>% filter(indicator %in% c("HTS_TST", "HTS_TST_POS", "KP_PREV", "OVC_SERV", "PMTCT_ART", "PMTCT_EID","PMTCT_STAT", "PP_PREV", "PrEP_NEW", "TB_ART", "TB_STAT", "TX_CURR", "TX_NEW", "TX_TB", "VMMC_CIRC")) %>% group_by(operatingunit,fundingagency,indicator) %>% summarise_at(vars(fy2018cum, fy2018_targets), ~ sum(., na.rm = TRUE)) %>% ungroup() %>% mutate(achvmt = round((fy2018cum/fy2018_targets*100),1)) %>% filter(!is.nan(achvmt)) #results by mech df_OUxMech <- df_OUxIM%>% filter(indicator %in% c("HTS_TST", "HTS_TST_POS", "KP_PREV", "OVC_SERV", "PMTCT_ART", "PMTCT_EID","PMTCT_STAT", "PP_PREV", "PrEP_NEW", "TB_ART", "TB_STAT", "TX_CURR", "TX_NEW", "TX_TB", "VMMC_CIRC")) %>% group_by(operatingunit,fundingagency,implementingmechanismname,indicator) %>% summarise_at(vars(fy2018cum, fy2018_targets), ~ sum(., na.rm = TRUE)) %>% ungroup() %>% mutate(achvmt = round((fy2018cum/fy2018_targets*100),1)) %>% filter(!is.nan(achvmt))
QC conducted against: MER_Structured_Dataset_OU_IM_FY17-18_20180622_v2_1. No issues found other than #6 which is now resolved.
1. OU x Agency x Indicator fy18 cumulative achievement -All OUs checked
2. OU x Agency x IM x Indicator fy18 cumulative achievement -Several OU x IMs checked