Loads of tutorials and literature about reproducible research is available but it turned out that there was no repository (that I know of) that reproducibly maps everything from the beginning (data analysis) to the end (publication). This repo is supposed to offer exactly that: It should be directly usable without customization, but also provide help to be able to adapt it to your own needs at necessary points.
Exemplary workflow to ensure reproducibility in data analysis and manuscript writing. The code for pre-processing, the analysis and the presentation of the results in the manuscript (code
) are version-controlled. The build information of the container for the runtime and development environment (Dockerfile + docker-compose
) is also version-controlled. The container image is version-controlled as well and stored in a dedicated online repository. The raw data itself is not version controlled via Git.
RStudio as integrated development environment for writing and compiling quarto documents with code (e.g. R or Python) and text (using Markdown or the visual editor). On the left: RStudio interface for composing the text and code next to each other. On the right: Rendered output document with dynamically incorporated results.
The text and code are evaluated on the basis of the data provided, resulting in a dynamically generated manuscript in the form of a Word, PDF or HTML document.
Interested in more information? Find the full paper about this project here.
-
Clone this repository:
git clone https://github.com/joundso/repub.git cd repub
-
Start the containerized RStudio by running
start.sh
, or by running:cd docker docker-compose up -d
-
Open RStudio in your browser at
http://127.0.0.1:8080/
- Login with the username
rstudio
and passwordpwd
- Open the project
repub.Rproj
in the lower right corner of the file browser
- Login with the username
-
Build the manuscript in the upper right part of RStudio:
Build
tab -->Render Book
button -
See the result in the included viewer or the file in the
docs
folder
- Bugs or Feature Requests: https://github.com/joundso/repub/issues
For the integration of the sources from the references.bib
file in the continuous text, permanent citation keys are used.
To dynamically create a references.bib
file, the Zotero plugin Better BibTeX for Zotero
can be used.
-
Installation instructions: https://retorque.re/zotero-better-bibtex/installation/
-
Afterwards, the 'automatic export' function can be used to automatically create and update a
*.bib
file depending on the content in your Zotero instance. -
One example for the creation of citation keys might be this:
auth.lower.replace(find=".",replace=_)+len+year | veryshorttitle+shortyear
. Information about the citation keys are available here. -
If necessary, adapt the path to the
.bib
file in_quarto.yml
:## The literature file goes here (use e.g. ## 'Better BibTeX for Zotero' to dynamically create this file): bibliography: meta/references.bib
There are thousnds of citation styles available for free online: https://github.com/citation-style-language/styles
Download the necessary style, store it locally and add the path to the .csl
file to the _quarto.yml
:
## Citation styltes from here: https://github.com/citation-style-language/styles
csl: meta/ios-press-books.csl
- Next to RStudio for R: Add Jupyter with Python backend to Docker deployment