Closed achafetz closed 5 years ago
Provided updated results and achievement by agency to Brianna.
Note: MOH targets do no reflect DATIM targets. Off by 6k. Used MoH results and DATIM targets.
R Script
library(tidyverse)
library(readxl)
library(knitr)
# MER TARGETS -------------------------------------------------------------
df_mwi <- read_rds("~/ICPI/Data/MER_Structured_Dataset_OU_IM_FY17-18_20181221_v2_1.rds") %>%
filter(operatingunit == "Malawi")
mer_pos_targets <- df_mwi %>%
filter(indicator == "HTS_TST_POS",
standardizeddisaggregate == "Total Numerator",
fundingagency == "USAID") %>%
group_by(fundingagency, mechanismid, implementingmechanismname) %>%
summarise_at(vars(fy2018_targets), sum, na.rm = TRUE) %>%
ungroup() %>%
filter(fy2018_targets!=0)
usaid_adj <- mer_pos_targets %>%
group_by(fundingagency) %>%
summarise_at(vars(fy2018_targets), sum) %>%
pull(fy2018_targets)
# MOH RESULTS -------------------------------------------------------------
path <- "~/Nigeria TDY/MWCC_FY18Q4_ahc.xlsx"
excel_sheets(path)
df_mwcc <- read_xlsx(path, sheet = "MWCC-FY18Q4_alt")
df_mwcc <- df_mwcc %>%
rename_all(~str_replace_all(., " ", "_") %>% tolower(.)) %>%
mutate(mechanismid = as.character(mechanismid))
df_mwcc <- df_mwcc %>%
mutate_all(~ ifelse(is.na(.), 0, .)) %>%
mutate(hts_tst_pos_fy18_apr = hts_tst_pos_fy18q1 + hts_tst_pos_fy18q2 + hts_tst_pos_fy18q3 + hts_tst_pos_fy18q4) %>%
group_by(fundingagency) %>%
summarise_at(vars(hts_tst_pos_fy18_apr, hts_tst_pos_fy18_targets), sum, na.rm = TRUE) %>%
ungroup()
# ACHIEVEMENT TABLE -------------------------------------------------------
df_mwcc %>%
mutate(hts_tst_pos_fy18_targets = ifelse(fundingagency == "USAID", usaid_adj, hts_tst_pos_fy18_targets),
hts_tst_pos_fy18_achievement = round(hts_tst_pos_fy18_apr/hts_tst_pos_fy18_targets,3)*100,
indicator = "HTS_TST_POS") %>%
rename_all(~ str_remove(., "hts_tst_pos_fy18_")) %>%
arrange(desc(achievement)) %>%
select(indicator, fundingagency, everything()) %>%
kable(format.args = list(big.mark = ",", zero.print = FALSE))
Brianna Smith requested a pull of the correct HTS_POS results and achievement for FO cluster meeting
HTS_POS numbers in DATIM/MSD are only in 5.5 districts with EMRs and community partners entering directly into DATIM.
I have the Q4 MoH breakdown and will use that to get back to Brianna.