Purpose: Work with the South Africa team to organize, structure, analyze, and visualize the weekly data coming in from partners.
This package is used to import, transform, and combine weekly partner data collected in Google Sheets and output a tidy csv file for analysis.
`-- Weekly Program Data
|-- WeeklyReports
| |-- ANOVA Weekly Programme monitoring.xlsx
| |-- BRHC Weekly Programme monitoring.xlsx
| |-- FPD Weekly Programme monitoring.xlsx
| `-- etc
|-- CombinedDataset
| `-- ZAF-Weekly-Programmme-Monitoring.csv
|-- SupportingMaterial
| |-- ZAF_FY18_site_targets.csv
| `-- SBU_ZAF_sites_2018-05-10_SBU.csv
`-- Tableau
`-- Programme Monitoring Report.twbx
You will also need to download two supporting files (ZAF_FY18_site_targets.csv and SBU_ZAF_sites_2018-05-10_SBU.csv) that contains COP17 targets and data related to site coordinates (eg lat/lon info). These files should be stored locally. In the tree diagram above, this file is stored in the SupportingMaterial folder.
One additional file you'll need is the Tableau file for doing the exploratory analysis. [This file is currently a work in progress and we don't yet have this produced]. Download this file and store it locally on your machine. In the tree diagram above, this is located in the Tableau folder.
If you don't currently have R/RStudio on your machine, you'll need to install that as well.
Alternatively, you can download R online from CRAN. If you are on a USAID machine, you will need CIO to install the software.
We have created a package to allow you to quickly and easily extract the partner data from each of their weekly reports and combine it all together into one file. You will need to install the following R "packages" the first time you run this.
``` ## INITIAL SETUP
#install supporting R packages install.packages("tidyverse") install.packages("readxl") install.packages("devtools") install.packages("fs")
#install WeekendSpecial package for ZAF program monitoring data extraction/combination devtools::install_github("USAID-ICPI/WeekendSpecial")
```
## REFRESH REPORTS STORED LOCALLY (optional)
#download weekly reports from Google Drive in one zipped folder (select all, right click and select download)
#change the file paths below to note where the zipped file is located and then where the weekly reports are stored
WeekendSpecial::wpm_filerefresh(filepath_zipped = "C:/Users/.../drive-download-20180510T140330Z-001.zip",
folderpath_reports= "C:/Users/.../Weekly Program Data/WeeklyReports")
``` ## WEEKLY UPDATE
#check for updates devtools::install_github("USAID-ICPI/WeekendSpecial")
#create combined, tidy dataset (output to csv) WeekendSpecial::wpm_combine(folderpath_reports = "C:/Users/.../Weekly Program Data/WeeklyReports", folderpath_sitecoords = "C:/Users/.../Weekly Program Data/SupportingMaterial", folderpath_targets = "C:/Users/.../Weekly Program Data/SupportingMaterial", folderpath_output = "C:/Users/.../Weekly Program Data/CombinedDataset")
```
The above code will output a csv file with a combined dataset that will serve as the basis for the Tableau exploratory analysis.
[More instructions to come around Tableau when that file is developed.]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.