knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
Project on developing sampling and survey methods to assess water, sanitation and hygiene (WASH) indicators in urban areas. Project commissioned by Water and Sanitation for the Urban Poor (WSUP).
This package contains functions for producing WASH indicator results from datasets collected in the various WSUP focus cities i.e., Dhaka, Bangladesh; Accra, Ghana; Nakuru, Kenya; Antananarivo, Madagascar; Maputo, Mozambique; and, Lusaka, Zambia. These functions can be used by a competent useR in producing indicators results from datasets collected using the specific Urban Water and Sanitation Survey design.
This package also implements a Shiny application that provides a graphical user interface to performing the data processing, analysis and visualisation using the various functions contained in this package. This application can be used by anyone wanting to produce indicator results from datasets collected using the specific Urban Water and Sanitation Survey design without having to know how to use R.
This package supersedes the RAnalyticFlow-based implementation of the Urban Water and Sanitation Survey found in this repository.
This latest wsup
version is in active development in preparation for submission to CRAN. You can install this development version of wsup
from GitHub with:
if(!require(remotes)) install.packages("remotes") remotes::install_github("validmeasures/wsup")
The wsup
package includes four main families of functions: 1) recode functions; 2) data processing and handling functions; 3) data analysis functions; and 4) Shiny web application function.
All recode functions in wsup
package start with the verb get_
then followed by the indicator set to be recoded. All recode functions take a survey dataset as its one and only argument. The survey dataset is expected to be collected using the specific Urban Water and Sanitation Survey survey questionnaire developed by WSUP. Survey dataset/s based on WSUP's survey questionnaire is available via the washdata
package which is available via CRAN and is installed as a dependency when the wsup
package is installed.
There are eight recode functions which recodes the following indicator sets:
Administrative data is obtained as follows:
get_admin_vars(washdata::surveyDataBGD)
head(wsup::get_admin_vars(washdata::surveyDataBGD), 10)
Demographic data is obtained as follows:
get_demo_vars(washdata::surveyDataBGD)
head(wsup::get_demo_vars(washdata::surveyDataBGD), 10)
Handwashing data is obtained and recoded as follows:
get_handwashing_vars(washdata::surveyDataBGD)
head(wsup::get_handwashing_vars(washdata::surveyDataBGD), 10)
Hygiene data is obtained and recoded as follows:
get_hygiene_vars(washdata::surveyDataBGD)
head(wsup::get_hygiene_vars(washdata::surveyDataBGD), 10)
Sanitation data is obtained and recoded as follows:
get_sanitation_vars(washdata::surveyDataBGD)
head(wsup::get_sanitation_vars(washdata::surveyDataBGD), 10)
Water data is obtained and recoded as follows:
get_water_vars(washdata::surveyDataBGD)
head(wsup::get_water_vars(washdata::surveyDataBGD), 10)
Poverty data is obtained and recoded as follows:
get_poverty_vars(washdata::surveyDataBGD, ccode = "BGD", ppiTable = ppitables::ppiBGD2013)
head(wsup::get_poverty_vars(washdata::surveyDataBGD, ccode = "BGD", ppiTable = ppitables::ppiBGD2013), 10)
Overall summary WASH data is obtained and recoded as follows:
get_overall_vars(adminDF = get_admin_vars(washdata::surveyDataBGD), waterDF = get_water_vars(washdata::surveyDataBGD), sanDF = get_sanitation_vars(washdata::surveyDataBGD))
head(wsup::get_overall_vars(adminDF = wsup::get_admin_vars(washdata::surveyDataBGD), waterDF = wsup::get_water_vars(washdata::surveyDataBGD), sanDF = wsup::get_sanitation_vars(washdata::surveyDataBGD)), 10)
This family of functions include 3 utilities for 1) combining all WASH indicators; 2) assigning datasets to North or South Dhaka Corporations; and, 3) getting variables names.
The wsup
package includes 3 data analysis functions that 1) performs the LQAS classification on single data; 2) performs the LQAS classification on the full dataset; and, 3) estimates results of indicators at various stratification levels.
A single function that runs the built-in Shiny web application in the wsup
package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.