watercostaccra

Data of household survey on water costs and coping strategies in Accra associated with a project report completed by Elizabeth Vicario for the “data science for openwashdata” course

https://github.com/openwashdata/watercostaccra

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

accra ghana household-surveys open-data openwashdata r water-cost
Last synced: 6 months ago · JSON representation ·

Repository

Data of household survey on water costs and coping strategies in Accra associated with a project report completed by Elizabeth Vicario for the “data science for openwashdata” course

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
accra ghana household-surveys open-data openwashdata r water-cost
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.Rmd

---
output: github_document
always_allow_html: true
editor_options: 
  markdown: 
    wrap: 72
  chunk_output_type: console
---



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

# watercostaccra



[![License: CC BY
4.0](https://img.shields.io/badge/License-CC_BY_4.0-pink.svg)](https://creativecommons.org/licenses/by/4.0/)
[![R-CMD-check](https://github.com/openwashdata/watercostaccra/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openwashdata/watercostaccra/actions/workflows/R-CMD-check.yaml)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13981225.svg)](https://zenodo.org/doi/10.5281/zenodo.13981225)


The goal of watercostaccra is to provide users with documentation on two surveys on household water costs, coping mechanisms as well as water point estimates conducted in November 2023 in Accra, Ghana. The data sets are associated with the following [project report](https://ds4owd-001.github.io/project-efvicario/) completed by Elizabeth Vicario for the ["data science for openwashdata" course](https://ds4owd-001.github.io/website/) offered by [openwashdata.org](https://openwashdata.org/).

## Installation

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

``` r
# install.packages("devtools")
devtools::install_github("openwashdata/watercostaccra")
```

Alternatively, you can download the individual data sets as a CSV or XLSX
file from the table below.

```{r, echo=FALSE, message=FALSE, warning=FALSE}
library(dplyr)
library(knitr)
library(readr)
library(stringr)
library(gt)
library(kableExtra)
library(ggtext)

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

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

```

## Data

The package provides access to household water costs, coping mechanisms as well as water point estimates.

```{r}
library(watercostaccra)
```

The `households` data set contains data about a household survey on water costs and coping strategies in Accra. It has `r nrow(households)` observations and `r ncol(households)` variables. 
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
  dplyr::filter(file_name == "households.rda") |>
  dplyr::select(variable_name:description) |> 
  knitr::kable() |> 
  kableExtra::kable_styling("striped") |>
   kableExtra::scroll_box(height = "400px")
```

The `waterpoints` data set contains data about a water point survey conducted in Accra as well. It has `r nrow(waterpoints)` observations and `r ncol(waterpoints)` variables. For an overview of the variable names, see the following table.
observations and `r ncol(households)` variables. 
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
  dplyr::filter(file_name == "waterpoints.rda") |>
  dplyr::select(variable_name:description) |> 
  knitr::kable() |> 
  kableExtra::kable_styling("striped") |>
   kableExtra::scroll_box(height = "400px")
```
## Example

Here is an example illustrating health risks associated with the water samples collected in Accra.

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

long_data <- waterpoints |> 
  pivot_longer(cols = c(coli_mpn_health_risk, tc_mpn_health_risk),
               names_to = "risk_type",
               values_to = "health_risk")

# Count occurrences of each health_risk category within each community and risk_type
count_data <- long_data |> 
  group_by(community, risk_type, health_risk) |> 
  summarise(count = n(), .groups = 'drop')

facet_labels <- c(
  coli_mpn_health_risk = "Coliform MPN health risk",
  tc_mpn_health_risk = "Total Coliform MPN health risk"
)

# Create the bar plot
ggplot(count_data, aes(x = community, y = count, fill = health_risk)) +
  geom_bar(stat = "identity", position = "dodge") +
  facet_wrap(~ risk_type, labeller = labeller(risk_type = facet_labels)) +
  labs(title = "Health risk assessment by community",
       x = "community",
       y = "count",
       fill = "health risk") +
  scale_fill_brewer(palette = "Dark2") +
  theme_minimal()

```


## License

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


## Citation

Please cite this package using:

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

Owner

  • Name: openwashdata
  • Login: openwashdata
  • Kind: organization

Citation (CITATION.cff)

# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "watercostaccra" in publications use:'
type: software
license: CC-BY-4.0
title: 'watercostaccra: Household water costs and coping strategies data from metropolitan
  Accra'
version: 0.0.0.9000
doi: 10.5281/zenodo.13981225
abstract: A household survey on water costs and coping strategies as well as a water
  point survey were conducted in two low-income communities in metropolitan Accra.
  These are Korle Gonno, a larger, well-planned coastal area with over 35 household
  water vendors, and Abuja, a small, densely packed, extralegal settlement with 15
  water vendor and bathhouse businesses.
authors:
- family-names: Vicario
  given-names: Elizabeth
  email: efv@usf.edu
  orcid: https://orcid.org/0009-0000-6081-2076
- family-names: Götschmann
  given-names: Margaux
  email: margauxg@ethz.ch
  orcid: https://orcid.org/0009-0002-2567-3343
- family-names: Davidson
  given-names: Betty Avanu
  email: badavidson@st.ug.edu.gh
  orcid: https://orcid.org/0009-0006-9594-4048
- family-names: Amankwaa
  given-names: Ebenezer F.
  email: efamankwaa@ug.edu.gh
  orcid: https://orcid.org/0000-0002-8735-2521
- family-names: Zhong
  given-names: Mian
  email: mzhong@ethz.ch
  orcid: https://orcid.org/0009-0009-4546-7214
repository-code: https://github.com/openwashdata/watercostaccra
url: https://github.com/openwashdata/watercostaccra
date-released: '2024-06-21'
contact:
- family-names: Götschmann
  given-names: Margaux
  email: margauxg@ethz.ch
  orcid: https://orcid.org/0009-0002-2567-3343
keywords:
- accra
- ghana
- household-surveys
- open-data
- openwashdata
- r
- water-cost

GitHub Events

Total
  • Create event: 4
  • Issues event: 2
  • Release event: 1
  • Delete event: 1
  • Issue comment event: 6
  • Push event: 7
  • Pull request review event: 1
  • Pull request event: 4
Last Year
  • Create event: 4
  • Issues event: 2
  • Release event: 1
  • Delete event: 1
  • Issue comment event: 6
  • Push event: 7
  • Pull request review event: 1
  • Pull request event: 4

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite