This function provides the underlying data for the SIMS Prioritizatation Tool. It uses the PEPFAR MER Structured Dataset to score sites a number of different metrics developed by the SIMS ST3 in mid-2018.
Creating a new tool for a country is relatively straight forward.
First you will need to download the SIMS Prioritization Tool Template, which can be found on this repo.
Next, you will need to have R/RStudio installed on your local machine. Through R, you can install the package to create the dataset and then load the data into the Excel template. Using the code below, you will install devtools
and use that to install this package from GitHub.
#install devtools
install.packages("devtools")
#install/update package
devtools::install_github("USAID-OHA-SI/asSIMSble")
#load package
library("asSIMSble")
With the package load, you will need to provide a few things: (1) the file path to the site MSD for a given operating unit (downloaded from PEPFAR Panorama), (2) the file path for the Excel template (downloaded from GitHub), and (3) the folder path to where you want the operating unit SIMS prioritizatoin file saved. Leaving the last two parameters blank will just store the scores to R's memory and not export them to the template.
#parameters - adjust to reflext location on your machine
filepath <- "~/ICPI/Data/MER_Structured_Dataset_SITE_IM_FY17-18_20180921_v2_2_PEPFARLandia.rds"
template_filepath <- "~/SIMS/Template/asSIMSble/Products/sims_prioritization_template.xlsx"
output_folderpath <- "~/SIMS/Products/"
# run and export to template
assemble(filepath, template_filepath, output_folderpath)
#run, storing in R's memory
df_scores <- assemble(filepath)
To run this against multiple OUs, you can take advantage of purrr::map()
.
#run for multiple countries
#install purrr if it's not currently installed (included in the tidyverse package)
install.packages("purrr")
library(purrr)
#list files
files <- c("~/ICPI/Data/MER_Structured_Dataset_SITE_IM_FY17-18_20180921_v2_2_Westeros.rds",
"~/ICPI/Data/MER_Structured_Dataset_SITE_IM_FY17-18_20180921_v2_2_Essos.rds",
"~/ICPI/Data/MER_Structured_Dataset_SITE_IM_FY17-18_20180921_v2_2_Sothoryos.rds")
#process multiple template creations
map(.x = files,
.f = ~ assemble(.x, template_filepath, output_folderpath))
For more information on the indicators, you can take a look at the wiki for more on indicators. Additionally, site data and sample data can be found on PEPFAR Sharepoint.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.