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 @@ -16,3 +16,4 @@
^_pkgdown\.yml$
^pkgdown$
^CRAN-SUBMISSION$
^CITATION\.cff$
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* Fork this repository to your Github account

* Clone your version on your account down to your machine from your account
* Clone your forked version to your machine

```
git clone https://github.com/<yourgithubusername>/washdata.git
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/mirror-codeberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mirror to other git server
on:
push:
branches:
- main
tags:
- "*"
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: yesolutions/mirror-action@master
with:
REMOTE: https://codeberg.org/katilingban/washdata
GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }}
GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
pull_request:
branches: [main, master]

name: pkgdown-pr

jobs:
netlify:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

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

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

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

- name: Install package
run: R CMD INSTALL .

- name: Create website
run: |
pkgdown::build_site()
shell: Rscript {0}

- name: Create index file
run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./docs/index.html

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './docs'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
# these default to 'true'
enable-commit-comment: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
5 changes: 3 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -23,18 +24,29 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
Expand Down
141 changes: 141 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------

cff-version: 1.2.0
message: 'To cite package "washdata" in publications use:'
type: software
license: CC0-1.0
title: 'washdata: Urban Water and Sanitation Survey Dataset'
version: 0.1.5
doi: 10.5281/zenodo.4058890
identifiers:
- type: doi
value: 10.32614/CRAN.package.washdata
- type: url
value: https://katilingban.io/washdata/
abstract: Urban water and sanitation survey dataset collected by Water and Sanitation
for the Urban Poor (WSUP) with technical support from Valid International. These
citywide surveys have been collecting data allowing water and sanitation service
levels across the entire city to be characterised, while also allowing more detailed
data to be collected in areas of the city of particular interest. These surveys
are intended to generate useful information for others working in the water and
sanitation sector. Current release version includes datasets collected from a survey
conducted in Dhaka, Bangladesh in March 2017. This survey in Dhaka is one of a series
of surveys to be conducted by WSUP in various cities in which they operate including
Accra, Ghana; Nakuru, Kenya; Antananarivo, Madagascar; Maputo, Mozambique; and,
Lusaka, Zambia. This package will be updated once the surveys in other cities are
completed and datasets have been made available.
authors:
- family-names: Guevarra
given-names: Ernest
email: ernestgmd@gmail.com
preferred-citation:
type: manual
title: 'washdata: Urban Water and Sanitation Survey Dataset'
authors:
- name: Ernest Guevarra
year: '2026'
notes: R package version 0.1.5
url: https://katilingban.io/washdata/
doi: 10.5281/zenodo.4058890
repository: https://CRAN.R-project.org/package=washdata
repository-code: https://github.com/katilingban/washdata
url: https://github.com/katilingban/washdata/
contact:
- family-names: Guevarra
given-names: Ernest
email: ernestgmd@gmail.com
keywords:
- dataset
- sanitation
- urban
- wash
- water
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
url: https://www.R-project.org/
authors:
- name: R Core Team
institution:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2026'
version: '>= 2.10'
- type: software
title: knitr
abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
notes: Suggests
url: https://yihui.org/knitr/
repository: https://CRAN.R-project.org/package=knitr
authors:
- family-names: Xie
given-names: Yihui
email: xie@yihui.name
orcid: https://orcid.org/0000-0003-0645-5666
year: '2026'
doi: 10.32614/CRAN.package.knitr
- type: software
title: rmarkdown
abstract: 'rmarkdown: Dynamic Documents for R'
notes: Suggests
url: https://pkgs.rstudio.com/rmarkdown/
repository: https://CRAN.R-project.org/package=rmarkdown
authors:
- family-names: Allaire
given-names: JJ
email: jj@posit.co
- family-names: Xie
given-names: Yihui
email: xie@yihui.name
orcid: https://orcid.org/0000-0003-0645-5666
- family-names: Dervieux
given-names: Christophe
email: cderv@posit.co
orcid: https://orcid.org/0000-0003-4474-2498
- family-names: McPherson
given-names: Jonathan
email: jonathan@posit.co
- family-names: Luraschi
given-names: Javier
- family-names: Ushey
given-names: Kevin
email: kevin@posit.co
- family-names: Atkins
given-names: Aron
email: aron@posit.co
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
- family-names: Cheng
given-names: Joe
email: joe@posit.co
- family-names: Chang
given-names: Winston
email: winston@posit.co
- family-names: Iannone
given-names: Richard
email: rich@posit.co
orcid: https://orcid.org/0000-0003-3925-190X
year: '2026'
doi: 10.32614/CRAN.package.rmarkdown
- type: software
title: spelling
abstract: 'spelling: Tools for Spell Checking in R'
notes: Suggests
url: https://ropensci.r-universe.dev/spelling
repository: https://CRAN.R-project.org/package=spelling
authors:
- family-names: Ooms
given-names: Jeroen
email: jeroenooms@gmail.com
orcid: https://orcid.org/0000-0002-4035-0289
- family-names: Hester
given-names: Jim
email: james.hester@rstudio.com
year: '2026'
doi: 10.32614/CRAN.package.spelling

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: washdata
Title: Urban Water and Sanitation Survey Dataset
Version: 0.1.4.9000
Version: 0.1.5
Authors@R: c(
person("Ernest", "Guevarra", email = "ernestgmd@gmail.com", role = c("aut", "cre")),
person("Valid International", "", email = "office@validinternational.org", role = "cph"),
Expand Down Expand Up @@ -29,7 +29,7 @@ License: CC0
Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.3.1
RoxygenNote: 7.3.3
URL: https://github.com/katilingban/washdata/, https://katilingban.io/washdata/
BugReports: https://github.com/katilingban/washdata/issues
VignetteBuilder: knitr
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# washdata (development version)
# washdata 0.1.5
* general maintenance and upkeep changes and updates

# washdata 0.1.4
* general documentation and formatting updates
Expand Down
23 changes: 20 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ knitr::opts_chunk$set(
# washdata: Urban Water and Sanitation Survey Dataset <img src="man/figures/logo.png" width="200" align="right" />

<!-- badges: start -->
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![CRAN status](https://www.r-pkg.org/badges/version/washdata)](https://CRAN.R-project.org/package=washdata)
[![CRAN](https://img.shields.io/cran/l/washdata.svg)](https://github.com/katilingban/washdata/blob/master/LICENSE.md)
[![cran checks](https://badges.cranchecks.info/worst/washdata.svg)](https://cran.r-project.org/web/checks/check_results_washdata.html)
[![CRAN](https://img.shields.io/cran/l/washdata.svg)](https://github.com/katilingban/washdata/blob/main/LICENSE.md)
[![CRAN](http://cranlogs.r-pkg.org/badges/washdata)](https://cran.r-project.org/package=washdata)
[![CRAN](http://cranlogs.r-pkg.org/badges/grand-total/washdata)](https://cran.r-project.org/package=washdata)
[![R-CMD-check](https://github.com/katilingban/washdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/katilingban/washdata/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/katilingban/washdata/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/katilingban/washdata/actions/workflows/test-coverage.yaml)
[![Codecov test coverage](https://codecov.io/gh/katilingban/washdata/graph/badge.svg)](https://app.codecov.io/gh/katilingban/washdata)
[![CodeFactor](https://www.codefactor.io/repository/github/katilingban/washdata/badge)](https://www.codefactor.io/repository/github/katilingban/washdata)
[![DOI](https://zenodo.org/badge/115544360.svg)](https://zenodo.org/doi/10.5281/zenodo.4058889)
[![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.washdata-blue)](https://doi.org/10.32614/CRAN.package.washdata)
<!-- badges: end -->

This package contains four datasets from an urban water and sanitation survey in Dhaka, Bangladesh conducted by [Water and Sanitation for the Urban Poor](https://wsup.com) with technical support from [Valid International](http://www.validinternational.org) in March 2017.
Expand All @@ -45,13 +51,24 @@ To install the package, issue the following commands in R:
install.packages("washdata")
```

::: {.package-devel}
Install development version of the package via GitHub:

```R
# if (!require) remotes install.packages("remotes")
remotes::install_github("katilingban/washdata")
# if (!require(pak)) install.packages("pak")
pak::pak("katilingban/washdata")
```

You can also install the package through the [Katilingban R Universe](https://katilingban.r-universe.dev) with:

```R
install.packages(
"washdata",
repos = c('https://katilingban.r-universe.dev', 'https://cloud.r-project.org')
)
```
:::

## Citation

If you find the `washdata` package useful please cite using the suggested citation provided by a call to the `citation()` function as follows:
Expand Down
Loading