FAIR Data Publishing

Publishing a dataset as an R data package with washr

Welcome

A dataset that sits as a spreadsheet in an online archive is available in principle, but hard to find, hard to understand and hard to cite. The FAIR principles ask for more. Data should be findable, accessible, interoperable and reusable. This guide walks through one way to get there. You turn a cleaned dataset into an R data package with a data dictionary, help pages, a README, a website, citation files and machine readable metadata, and you publish it with a DOI.

The guide is written for researchers at Global Health Engineering at ETH Zurich and for the openwashdata community, and it works for anyone who publishes a dataset under their own GitHub organisation. It builds on washr, the R package that writes each file of the package from what you have already written. The code in this guide was last checked against washr version 1.2.0, the version recorded in the WASHR_VERSION file of the source repository.

Three ways to follow the workflow

The same steps exist in three forms, and each form has one job.

  • This guide is the narrative. It explains why each step exists and covers the parts that happen outside R, such as creating the GitHub repository and the Zenodo release. It needs no AI tools.
  • The washr vignette Get started with washr is the condensed reference, with one section per function in the same order as the chapters here.
  • The washr skill in the openwashdata plugin for Claude Code is the AI assisted path. It runs the same functions and drafts the descriptions, titles and README text for you to confirm.

What the chapters cover

1  Creating the package and its repository creates the package and connects it to GitHub. 2  Preparing the data brings in the raw data, cleans it into a tidy dataset and writes the data dictionary. 3  Documenting the data writes the help pages, completes the package metadata and generates the machine readable description. 4  Publishing the data writes the README and builds the website. 5  Creating a release and a DOI creates the release and the DOI. 6  Troubleshooting collects the problems we have seen and what fixed them.

Every washr function reads what is there, merges its changes and writes only what changed, so you can run a step again after you have edited the files it wrote.

This guide is a work in progress. As more data is published, we learn more, and these insights flow back into the guide. If something is unclear or incomplete, please open an issue in the source repository.