An open API service indexing awesome lists of open source software.

https://github.com/openwashdata/cleanteamghana

This package compiles user experience data for the Clean Team Ghana container-based sanitation service in Kumasi, Ghana.
https://github.com/openwashdata/cleanteamghana

container-based-sanitation ghana open-data openwashdata r sanitation

Last synced: 4 months ago
JSON representation

This package compiles user experience data for the Clean Team Ghana container-based sanitation service in Kumasi, Ghana.

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)

library(tidyverse)
library(epoxy)
library(leaflet)
library(cleanteamghana)
```

# cleanteamghana

[![DOI](https://zenodo.org/badge/709679841.svg)](https://zenodo.org/doi/10.5281/zenodo.10439886)
[![R-CMD-check](https://github.com/openwashdata/cleanteamghana/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openwashdata/cleanteamghana/actions/workflows/R-CMD-check.yaml)

This package contains compiled data utilized in a research paper examining the user experience of the Clean Team Ghana's container-based sanitation service in Kumasi, Ghana.

```{r, echo=FALSE}
library(ggplot2)

annotations <- data.frame(
x = c(round(mean(cleanteamghana$time_to_access_toilet, na.rm = TRUE), 2),
round(median(cleanteamghana$time_to_access_toilet, na.rm = TRUE), 2)),
y = c(165, 175),
label = c("Mean:", "Median:")
)

ggplot(cleanteamghana, aes(time_to_access_toilet)) +
geom_histogram(binwidth = 3, color = "#000000", fill = "#59CF94", boundary = 0, na.rm = TRUE) +
labs(
title = "Time to access toilets before installation of CTG containers",
x = "Time (minutes)",
y = "Count"
) +
theme_classic() +
theme(
plot.title = element_text(color = "#59CF94", size = 16, face = "bold")
) +
scale_x_continuous(breaks = seq(0, 60, by = 10)) +
geom_text(data = annotations, aes(x = x, y = y, label = paste(label, x)), size = 3, fontface = "bold")
```

## Installation

You can install the development version of cleanteamghana from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("openwashdata/cleanteamghana")
```
Alternatively, you can download the individual dataset as a CSV or XLSX
file from the table below.

```{r, echo=FALSE}
library(dplyr)
library(stringr)
library(readr)

extdata_path <- "https://github.com/openwashdata/cleanteamghana/raw/main/inst/extdata/"

read_csv("data-raw/dictionary.csv", col_types = cols(.default = "c")) |>
distinct(file_name) |>
mutate(file_name = str_remove(file_name, ".rda")) |>
rename(dataset = file_name) |>
mutate(
CSV = paste0("[Download CSV](", extdata_path, dataset, ".csv)"),
XLSX = paste0("[Download XLSX](", extdata_path, dataset, ".xlsx)")
) |>
knitr::kable(show_col_types = FALSE)

```

# The research paper
The research paper associated with this data package is named ["Evaluation of user experiences for the Clean Team Ghana container-based sanitation service in Kumasi, Ghana"](https://iwaponline.com/washdev/article/12/3/336/86884/Evaluation-of-user-experiences-for-the-Clean-Team) (Tidwell et al., 2022).

*Tidwell, J. B., Nyarko, K. B., Ross, I., Dwumfour-Asare, B., & Scott, P. (2022). Evaluation of user experiences for the Clean Team Ghana container-based sanitation service in Kumasi, Ghana. Journal of Water, Sanitation and Hygiene for Development, 12(3), 336–346. https://doi.org/10.2166/washdev.2022.013*

It was published in the Journal of Water, Sanitations & Hygiene (WASH) for Development on March 1st, 2022.

## Description
Few affordable and acceptable sanitation solutions exist for densely populated, low-income urban areas. Container-based toilets, considered a safely managed sanitation solution, lack substantial insights into user experiences, essential for governmental considerations. A study was conducted on sanitation quality changes pre- and post-enrollment due to the [Clean Team Ghana (CTG)](https://www.cleanteamtoilets.com/) container-based toilet service in Kumasi, Ghana, spanning June to December 2019. Data was gathered before installation and ten weeks after for 292 customers. Initially, most customers utilized structurally sound public toilets, yet often faced issues like poor hygiene, inadequate handwashing facilities, and an average 14.3-minute usage time. The study revealed that CTG offered a high-quality service, significantly enhancing customers' quality of life, saving costs, narrowing gender disparities, and catering to individuals with physical disabilities. Fewer than 10% of customers reported issues with CTG, such as leakage, filling, odor, or irregular replacements. This evaluation adds weight to the emerging evidence supporting the value users place on container-based sanitation in densely populated urban settings.

## Data

The data set includes household survey responses on sanitation service levels, quality, practices, and observed behaviors. The Sanitation Quality of Life (SanQoL) scores were measured on a 0 (never able) to 3 (always able) scale. Sanitation satisfaction was scored on a scale from 0 to 4, with 0 representing very unsatisfied, 4 representing very satisfied, and 2 being neither satisfied nor unsatisfied.

The package provides access to a single data set.

```{r, echo = TRUE}
library(cleanteamghana)
```

The `cleanteamghana` data set has `r ncol(cleanteamghana)`
variables and `r nrow(cleanteamghana)` observations. For an overview
of the variable names, see the following table.

```{r, eval=FALSE}
cleanteamghana
```

```{r, echo=FALSE}
readr::read_csv("data-raw/dictionary.csv", col_types = cols(.default = "c")) |>
dplyr::filter(file_name == "cleanteamghana.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable()
```

## Examples

### 1) Visualizing Toilet Access Time (Pre-CTG Containers Installation)

This code snippet utilizes ggplot2 to create a histogram illustrating the time taken to access toilets before the implementation of CTG (Clean Team Ghana) containers. The histogram showcases the distribution of time-to-access values, with mean and median annotations indicating central tendency.

```{r}
library(ggplot2)

annotations <- data.frame(
x = c(round(mean(cleanteamghana$time_to_access_toilet, na.rm = TRUE), 2),
round(median(cleanteamghana$time_to_access_toilet, na.rm = TRUE), 2)),
y = c(165, 175),
label = c("Mean:", "Median:")
)

ggplot(cleanteamghana, aes(time_to_access_toilet)) +
geom_histogram(binwidth = 3, color = "#000000", fill = "#59CF94", boundary = 0, na.rm = TRUE) +
labs(
title = "Time to access toilets before installation of CTG containers",
x = "Time (minutes)",
y = "Count"
) +
theme_classic() +
theme(
plot.title = element_text(color = "#59CF94", size = 16, face = "bold")
) +
scale_x_continuous(breaks = seq(0, 60, by = 10)) +
geom_text(data = annotations, aes(x = x, y = y, label = paste(label, x)), size = 3, fontface = "bold")
```

### 2) Customer Sanitation Satisfaction Categories: Mean Scores Comparison

The following code computes the mean satisfaction scores across the various sanitation categories, presenting a comparative analysis through a bar plot.

```{r}
library(dplyr)
library(ggplot2)

# Calculating mean scores for each satisfaction category
satisfaction_means <- cleanteamghana |>
mutate(across(starts_with("satisfaction"), as.integer)) |>
summarise(across(starts_with("satisfaction"), ~mean(., na.rm = TRUE))) |>
rename_with(~gsub("satisfaction_", "", .), starts_with("satisfaction")) |>
rename_with(~gsub("towards_", "", .), starts_with("towards")) |>
rename_with(~gsub("avoiding_", "", .), starts_with("avoiding"))
# Converting the data to a format suitable for plotting
satisfaction_means <- satisfaction_means |>
tidyr::pivot_longer(cols = everything(), names_to = "Satisfaction_Category", values_to = "Mean_Score")

# Creating the bar plot
ggplot(satisfaction_means, aes(x = Satisfaction_Category, y = Mean_Score)) +
geom_bar(stat = "identity", fill = "#59CF94", color = "#000000") +
geom_text(aes(label = round(Mean_Score, 2)), vjust = -0.5, color = "black", size = 3.5) + # Add mean labels on top of bars
labs(
title = "Mean Sanitation Satisfaction Scores",
x = "Satisfaction Category",
y = "Mean Score"
) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 60, hjust = 1, size = 8)
)+
ylim(0, 4)
```

## License

Data are available as
[CC-BY](https://github.com/openwashdata/cleanteamghana/LICENSE.md).

## Citation

To cite this package, please use:

```{r}
citation("cleanteamghana")
```