Skip to contents

washr turns a cleaned dataset into a documented R data package that follows the FAIR principles, with a website, a citation file and machine readable metadata. It is the toolkit behind the openwashdata data packages, and it works for any group that publishes open data as an R package.

Installation

The stable release, from CRAN:

The current development build, from the openwashdata R-universe. It is rebuilt on every push and installs like any other package, with no compiler toolchain:

install.packages("washr", repos = c("https://openwashdata.r-universe.dev", getOption("repos")))

The same development source from GitHub, built on your machine:

# install.packages("remotes")
remotes::install_github("openwashdata/washr")

What washr does

The stable core scaffolds and documents the package, one function per step, in the order you run them:

  • setup_ci() adds the R CMD check workflow the review standard requires.
  • setup_rawdata() creates data-raw/ and the processing script.
  • setup_dictionary() writes the variable dictionary from the data objects, and update_dictionary() brings it in line with the data after a change.
  • setup_roxygen() writes the roxygen documentation from the dictionary.
  • update_description() completes DESCRIPTION to the openwashdata standard.
  • setup_readme() writes the README from the template.
  • setup_website() writes the pkgdown configuration and builds the site.
  • update_website() brings an existing pkgdown configuration up to date with the template.
  • use_brand() installs the openwashdata brand and the logo for the site and the README.
  • update_citation() writes the citation files, with the DOI once there is one, and the .zenodo.json that files the release on Zenodo as a dataset.

check_publication_readiness() then reports, item by item, what is in place and what is still missing before the release.

The FAIR layer is one experimental function. update_metadata() derives a schema.org description of the dataset from the files above and embeds it in the site, where dataset search engines read it.

Every function reads what is there, merges its changes, and is safe to run again.

A package scaffolded with washr meets the required tier of the openwashdata review standard, pkgreview. A workflow builds a fixture package on every push and checks it against the pkgreview version recorded in PKGREVIEW_FLOOR.

How to use washr

The Get started page walks through the workflow in order, and the Reference page documents each function. The FAIR Data Publishing guide covers the same steps with more explanation and the parts outside R, such as the GitHub repository and the Zenodo release.