use_author(given = "First Name", family = "Last Name",
role = c("aut", "cre"), email = "Your email",
comment = c(ORCID = "XXXX-XXXX-XXXX-XXXX"))openwashdata Data Package Hackathon
This hackathon is organized by Mian Zhong from the Global Health Engineering group at ETH Zurich. Participants will make an openwashdata R data package with the washr package developed by openwashdata.
๐ฏ Objectives
- Deliver publishable openwashdata data packages
- Beta-test the
washrR package to receive feedback for the package release - Meet openwashdata friends and have fun
๐ Showcase
Here showcase the data packages developed from our hackathon. These datasets cover WASH data about Malawi ๐ฒ๐ผ, Uganda ๐บ๐ฌ, Brazil ๐ง๐ท, Peru ๐ต๐ช, and Ghana. A big shoutout to all the participants for their hard work and dedication!


๐ Event Details
Date: Friday, June 21, 9:00 AM - 4:30 PM (CET)
Location: Location: Zurich, Switzerland

๐ Agenda
| Time | Title | Remark |
|---|---|---|
| 08:30 - 09:00 | Check in & Breakfast | |
| 09:00 - 09:05 | Opening | by Mian Zhong |
| 09:05 - 09:50 | Introduction workshop for washr R package | by Mian Zhong |
| 10:00 - 12:00 | Coding | Package Setup & Data Cleaning |
| 12:00 - 12:40 | Lunch | |
| 12:45 - 14:45 | Coding | Data Cleaning & README writing |
| 14:45 - 15:00 | Break / Stretch | |
| 15:00 - 15:30 | Final Polish | Write Feedback Survey |
| 15:30 - 16:15 | Showcase | |
| 16:25 - 16:30 | Closing |
๐ผ๏ธ Slides
๐งโ๐ป Workflow
Initialize package repository
Open GitHub
Open RStudio IDE
Create a new project following:
-
Scroll down, this option is usually at bottom

-
Configure Git version control on your local computer.
usethis::use_git_config(user.name = "Your Name", user.email = "Your GitHub Email")Add git version control to local directory
yes, commit
yes, restart
Connect local computer with GitHub, please refer to https://happygitwithr.com/https-pat.html for more details.
-
usethis::create_github_token() -
-
Open Terminal (the tab next to Console), run commands suggested in your assigned GitHub repository. The commands should look like the following:
# Change the url link to be your assigned GitHub repo! git remote add origin "https://github.com/openwashdata/fssample.git" git branch -M main git push -u origin mainYou can find and copy the commands in your assigned repo too:

If this is your FIRST TIME connecting RStudio with GitHub, you will receive a message in the Terminal to log in. Enter your GitHub username, and for the password, copy-and-paste the PAT token generated from Step 7 (
ghp_xxxxxxxxxxxxxxxxxxxxxx)
Install
washrR package:library(devtools) devtools::install_github("openwashdata-dev/washr")You might encounter a message to update packages, choose the option โAllโ to continue.

Load required libraries:
library(devtools)library(usethis)library(washr)
Create Dataset
Data Processing
- Add directory for raw data to project
- In Console, execute
setup_rawdata()
- In Console, execute
- Move raw data files to the directory
data-rawAdd, commit and push all changes to GitHub
- Select โGitโ tab on the top-right panel
- (Click โPullโ first for good practice)
- Tick all files and click Commit
- Enter a commit message and click โpushโ


- Work on
data-raw/data_processing.Rto clean raw data and export tidy data.- You may need to modify or delete some code in
data_processing.R
- You may need to modify or delete some code in
- Export the tidy data by executing the whole
data_processing.R- Add, commit and push all changes to GitHub
Dictionary
- Once data reaches tidy state, in console, execute
setup_dictionary()- Go to
data-raw/dictionary.csv - Fill the column โdescriptionโ in
dictionary.csvfor each dataset and variable- It might be easier to edit in a spreadsheet software (e.g. Excel)
- Save
dictionary.csv
- Go to
- Add, commit and push all changes to GitHub:
Document Dataset
Roxygen
- Initiate and write documentation in
R/folder by executing in console:setup_roxygen()Open each documentation file in
R/to write a human-readable title and description about the dataset
- Add, commit and push all changes to GitHub
- Use
devtoolsto document, check and install the packagedevtools::document()devtools::check()devtools::install()If there is any error or warning, please let me know and we can look together. You will have a warning message about license which will be addressed in the next step.
DESCRIPTION
- Add yourself as the creator and author of the package
On GitHub, create an issue with details to write up author information for
DESCRIPTIONfile- Contributors (name, email, role, ORCID)
- Include everyone here
- Roles
- cre = maintainer
- aut = significant contributions
- ctb = contributor with smaller contributions
- Roles
- Include everyone here
- Add other author(s):
use_author(given = "Second Author", family = "Second Author", role = "aut")- Contributors (name, email, role, ORCID)
Go to
DESCRIPTIONfile, write theTitleandDescriptionabout the package. Then, in console, run:update_description()to update other fields. Proof-read theDESCRIPTIONfile to make sure that the fields are correct.Use
devtoolsto document, check and install the packagedevtools::document()devtools::check()devtools::install()If there is any error or warning, please let me know and we can look together.
Communicate Dataset
README
- In console, execute
setup_readme().- If you are not tight on time, optionally, enable
has_example=TRUEto create an example article for the package.
- If you are not tight on time, optionally, enable
- Open
README.Rmdand edit the sections.- Make at least one plot about the data in the section โExampleโ
- Once you finish writing
README.Rmd, runbuild_readme(). - Add, commit and push all changes to GitHub
Pkgdown Website
- In console, run
setup_website()to create an openwashdata style pkgdown websiteSelect โNoโ option to not override the
_pkgdown.ymlin the console
- Use
devtoolsto document, check and install the packagedevtools::document()devtools::check()devtools::install()If there is any error or warning, please let me know and we can look together.
- Open
.gitignore, removedocs, and save the file. - Add, commit and push all changes to GitHub


