Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^pkgdown$
^\.github$
^references
^package_processing\.R$
11 changes: 7 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# R CMD check on every push and pull request, written by washr::setup_ci().
# Derived from https://github.com/r-lib/actions/tree/v2/examples (check-standard),
# with the dev branch in the triggers as the openwashdata review standard requires.
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
branches: [main, master, dev]
pull_request:
branches: [main, master]
branches: [main, master, dev]
workflow_dispatch:

name: R-CMD-check

Expand Down Expand Up @@ -47,4 +50,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
build_args: 'c("--no-manual")'
47 changes: 47 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.httr-oauth
.DS_Store
.quarto
docs
41 changes: 33 additions & 8 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v1.0.0
# ------------------------------------------------
# CITATION.cff file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
# ------------------------------------------------

cff-version: 1.2.0
message: 'To cite package "rwpfunctionality" in publications use:'
type: software
type: dataset
license: CC-BY-4.0
title: 'rwpfunctionality: Water point functionality assessment in nine sub-Saharan
Africa and South Asia countries'
title: 'rwpfunctionality: Water point functionality in sub-Saharan Africa and South
Asia'
version: 0.0.1
doi: 10.5281/zenodo.10878635
doi: 10.5281/zenodo.10878634
abstract: 'Water point monitoring data associated with the paper "[Rural water point
functionality estimates and associations: evidence from nine countries in sub-Saharan
Africa and South Asia](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2023WR034679)"
Expand Down Expand Up @@ -38,9 +38,34 @@ authors:
- family-names: Kayser
given-names: Georgia L.
orcid: https://orcid.org/0000-0002-3273-184X
date-released: '2024-03-26'
repository-code: https://github.com/openwashdata/rwpfunctionality
url: https://github.com/openwashdata/rwpfunctionality
date-released: '2024-03-11'
contact:
- family-names: Götschmann
given-names: Margaux
email: margauxg@ethz.ch
orcid: https://orcid.org/0009-0002-2567-3343
keywords:
- open data
- washdata
- water points
- functionality
- rural water supply
- water committees
- Ethiopia
- India
- Malawi
- Mali
- Mozambique
- Nepal
- Niger
- Rwanda
- Uganda
- management
- open-data
- r
- wash
- water
- waterpoint

11 changes: 8 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Package: rwpfunctionality
Title: Water point functionality assessment in nine sub-Saharan Africa and South
Asia countries
Title: Water point functionality in sub-Saharan Africa and South Asia
Version: 0.0.1
Authors@R: c(
person("Margaux", "Götschmann", , "margauxg@ethz.ch", role = c("aut", "cre"),
Expand All @@ -18,9 +17,15 @@ Description: Water point monitoring data associated with the paper "[Rural water
License: CC BY 4.0
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Depends:
R (>= 2.10)
LazyData: true
Language: en-GB
Date: 2024-03-11
Config/Needs/website: rmarkdown, tidyverse, kableExtra
URL: https://github.com/openwashdata/rwpfunctionality
BugReports: https://github.com/openwashdata/rwpfunctionality/issues
X-schema.org-keywords: open data, washdata, water points, functionality, rural water supply, water committees, Ethiopia, India, Malawi, Mali, Mozambique, Nepal, Niger, Rwanda, Uganda
X-schema.org-spatialCoverage: Ethiopia, India, Malawi, Mali, Mozambique, Nepal, Niger, Rwanda, Uganda
X-schema.org-temporalCoverage: 2017-05-22/2020-12-19
Config/roxygen2/version: 8.0.0
4 changes: 2 additions & 2 deletions R/rwpfunctionality.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' Water point functionality assessment in nine sub-Saharan Africa and South
#' Asia countries
#' Water point functionality in sub-Saharan Africa and South Asia
#'
#' Water point monitoring data associated with the paper "[Rural water point
#' functionality estimates and associations: evidence from nine countries in sub-Saharan
#' Africa and South Asia](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2023WR034679)" (Murray, Anna L et al., 2024).
#'
#' @format A tibble with 1793 rows and 52 variables
#' \describe{
#' \item{id}{Row number assigned during processing}
#' \item{country}{Name of the country}
#' \item{admin1}{Administrative unit 1}
#' \item{admin2}{Administrative unit 2}
Expand Down
11 changes: 5 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ knitr::opts_chunk$set(
fig.path = "man/figures/README-",
out.width = "100%"
)
knitr::opts_chunk$set(screenshot.force = FALSE)

library(tidyverse)
```
Expand Down Expand Up @@ -68,7 +69,7 @@ Sustained functionality of rural water systems is a global challenge. Addressing

The dataset includes observations of water point functionality and management committee questionnaires. Displayed on the map are the locations of the water points.

![](man/figures/map.png)
<img src="man/figures/map.png" alt="Map of the water point locations in the nine countries" width="100%"/>

The package provides access to one single dataset.

Expand Down Expand Up @@ -115,11 +116,9 @@ rwpfunctionality |>
scale_fill_manual(values = custom_colors) + # Set custom colors
labs(title = "Functionality rating for water points", fill = NULL,
x = "", # Empty x-axis label
y = "Count") + # y-axis label
scale_fill_manual(labels = c("Functional", "Partially functional", "Abandoned or not functional"),
values = custom_colors) # Custom legend labels
y = "Count") # y-axis label
```
Based on this pie chart, it could be interesting to redefine the category "Partially functional" to gain insights and precision on this aspect of the data. However, we still clearly see that only a small part of the water points are functional.
Based on this pie chart, it could be interesting to redefine the category "Partially functional" to gain insights and precision on this aspect of the data. Most water points are functional: `r sum(rwpfunctionality$functional3 == "Functional")` of `r nrow(rwpfunctionality)`.

### Water Points Types

Expand All @@ -146,7 +145,7 @@ This plot provides insight into the distribution of different types of water poi
## License

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

## Citation

Expand Down
Loading
Loading