[1] "/Users/Anna/Documents/workflows/talks"
Marine Biology Live - 12th Dec 2023
Reproducibility has the potential to serve as a minimum standard for judging scientific claims when full independent replication of a study is not possible.
Reproducible Research in Computational Science ROGER D. PENG, SCIENCE 02 DEC 2011 : 1226-1227
Karthik Ram: rstudio::conf 2019 talk
File > New Project > New Directory

herehere to create robust relative pathsinstall.R scriptrenv (previously packrat)will revisit later on
The management of changes to documents, computer programs, large web sites, and other collections of information.

Open source (free to use) Version control software.

A website (https://github.com/) that allows you to store your Git repositories online and makes it easy to collaborate with others.


. . .
usethis 📦 == ❤️ Git & GitHub 🤩
It’s now a repository
Forgot to check git box? use usethis::use_git()




README. Explain what your project is, and how to use it.
usethis::use_readme_md()usethis::use_readme_rmd()LICENSE. Without a licence, the contents of the repository are technically closed.
usethis::use_mit_license(name = "Anna Krystalli")?licenses: details of functions available to generate licensesCONTRIBUTING.md - guidelines for contributors.
usethis::use_tidy_contributing() provides a relatively strict but instructive templateCODE_OF_CONDUCT.md set the tone for discourse between contributors.
use_code_of_conduct()

Programming paradigm first introduced by Donald E. Knuth.
Treat program as literature to be understandable to human beings
- focus on the logic and flow of human thought and understanding
- single document to integrate data analysis (executable code) with textual documentation, linking data, code, and text
qmd or Rmarkdown .Rmd) integrates:a documentantion language (.md)
a programming language (R, python, SQL)
functionality to “knit” (render) them together through 📦 knitr
✅ provides a framework for writing narratives around code and data
✅ Code re-run in a clean environment every time the document is rendered

---
title: "Toward a Unified Theory of High-Energy Metaphysics: Silly String Theory"
date: 2008-02-29
author:
- name: Josiah Carberry
id: jc
orcid: 0000-0002-1825-0097
email: josiah@psychoceramics.org
affiliation:
- name: Brown University
city: Providence
state: RI
url: www.brown.edu
abstract: >
The characteristic theme of the works of Stone is
the bridge between culture and society. ...
keywords:
- Metaphysics
- String Theory
license: "CC BY"
copyright:
holder: Josiah Carberry
year: 2008
citation:
container-title: Journal of Psychoceramics
volume: 1
issue: 1
doi: 10.5555/12345678
funding: "The author received no specific funding for this work."
---
Adding a reference to an image:
Referencing the image:

Quarto Pub: Publish rendered quarto documents on the web with the click of a button in Rstudio https://quartopub.com/
GitHub: Host your site through gh-pages on GitHub. Enable in GitHub repo ⚙️Settings. See GitHub Pages chapter in Quarto documentation for more details.
Netlify: Connect a repository, build your site, deploy and host for free. https://www.netlify.com/. See Netlify chapter in Quarto documentation for more details.
In the beginning: many lines of directly executed code in a single analysis script.
As it matures: reusable chunks ➡️ functions.
Useful conventions
Useful software development tools
Easy publishing through GitHub

metadata: in the DESCRIPTION file
functions in .R scripts in the R/ folder
tests in the tests/ folder
Documentation:
.Rmd documents in the vignettes/ folderDESCRIPTION filePackage: EMODnetWCS
Title: Access EMODnet Web Coverage Service data through R
Version: 0.0.0.9012
Authors@R: c(
person("Anna", "Krystalli", , "annakrystalli@googlemail.com", role = "aut",
comment = c(ORCID = "0000-0002-2378-4915")),
person("Salvador", "Fernández-Bejarano", , "salvador.fernandez@vliz.be", role = "cre",
comment = c(ORCID = "0000-0003-0535-7677")),
person("European Marine Observation Data Network (EMODnet) Biology project", "European Commission's Directorate - General for Maritime Affairs and Fisheries (DG MARE)", , "bio@emodnet.eu", role = "cph"),
person("VLIZ (VLAAMS INSTITUUT VOOR DE ZEE)", , , "info@vliz.be", role = "fnd")
)
Description: Access and interrogate EMODnet Web Coverage Service data
through R.
License: MIT + file LICENSE
Imports:
checkmate,
cli,
curl,
glue,
httr,
magrittr,
memoise,
ows4R (>= 0.3-2),
purrr,
rlang,
sf,
terra,
tibble
Suggests:
covr,
fs,
httptest,
huxtable,
knitr,
rmarkdown,
testthat (>= 3.0.0),
webmockr,
withr
Config/testthat/edition: 3
Remotes:
eblondel/ows4R
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
URL: https://github.com/EMODnet/EMODnetWCS,
https://emodnet.github.io/EMODnetWCS/
BugReports: https://github.com/EMODnet/EMODnetWCS/issues
Depends:
R (>= 3.3.0)
LazyData: true
VignetteBuilder: knitr
Date: 2022-09-29
To cite package 'EMODnetWCS' in publications use:
Krystalli A (2022). _EMODnetWCS: Access EMODnet Web Coverage Service
data through R_. R package version 0.0.0.9012. Integrated data
products created under the European Marine Observation Data Network
(EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013),
funded by the European Union under Regulation (EU) No 508/2014 of the
European Parliament and of the Council of 15 May 2014 on the European
Maritime and Fisheries Fund, <https://github.com/EMODnet/EMODnetWCS>.
A BibTeX entry for LaTeX users is
@Manual{,
title = {{EMODnetWCS}: Access EMODnet Web Coverage Service data through R},
author = {Anna Krystalli},
year = {2022},
note = {R package version 0.0.0.9012. Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund},
url = {https://github.com/EMODnet/EMODnetWCS},
}
R/Create a new function .R file in the R/ folder
R
└── add.R
0 directories, 1 files
RoxygenCode > Insert Roxygen Skeleton
param), outputs (return) and usage by providing examples.Rd files in man/)Creates a tests/ folder with the following files
tests
├── testthat
│ ├── test-add.R
└── testthat.R
“an article about computational result is advertising, not scholarship. The actual scholarship is the full software environment, code and data, that produced the result.”
John Claerbout paraphrased in Buckheit and Donoho (1995)
” …We introduce the concept of a compendium as both a container for the different elements that make up the document and its computations (i.e. text, code, data, …), and as a means for distributing, managing and updating the collection.”

Ben Marwick, Carl Boettiger & Lincoln Mullen (2018) Packaging Data Analytical Work Reproducibly Using R (and Friends)
Paper:

Compendium

rrtools: Creating Compendia in R“The goal of rrtools is to provide instructions, templates, and functions for making a basic compendium suitable for writing reproducible research with R.”
rrtools from GitHubBased on R package structure
.
├── CONDUCT.md
├── CONTRIBUTING.md
├── DESCRIPTION
├── LICENSE
├── LICENSE.md
├── NAMESPACE
├── README.Rmd
├── README.md
├── analysis
│ ├── data
│ │ ├── DO-NOT-EDIT-ANY-FILES-IN-HERE-BY-HAND
│ │ ├── derived_data # data generated during the analysis
│ │ └── raw_data # data obtained from elsewhere
│ ├── figures # location of the figures produced by the qmd
│ ├── paper
│ │ ├── paper.qmd # this is the main document to edit
│ │ └── references.bib # this contains the reference list information
│ ├── supplementary-materials
│ └── templates
│ ├── author-info-blocks.lua
│ ├── journal-of-archaeological-science.csl
| | # this sets the style of citations & reference
| | # list
│ ├── pagebreak.lua
│ ├── scholarly-metadata.lua
│ ├── template.Rmd
│ └── template.docx # used to style the output of the paper.qmd
└── myproject.Rproj
paper.qmd to paper.pdfRmd


GDAL ❌
standardized units of software
package up everything needed to run an application: code, runtime, system tools, system libraries and settings in a lightweight, standalone, executable package

Dockerfile: Text file containing recipe for setting up computation environment.
Docker Image: Executable built from the Dockerfile with all required dependencies installed. Can have many images from the same Dockerfile.
Docker Container: Docker Images become containers at runtime
rocker/geospatial Docker Image ✅
Karthik Ram: rstudio::conf 2019
Bring your code repositories to life!


Create Dockerfile w/ rrtools
📦 containerit packages R script/session/workspace and all dependencies as a Docker container by automagically generating a suitable Dockerfile
Binderise your R projects
holepuch 📦 provides functionality for configuring R projects for binder. holepuch workshop materials19-21 March 2024
Early bird pricing till 31st Jan 2024!
8-9 May 2024

annakrystalli@fosstodon.org