Reproducible research

a.k.a Literate programming.

An attempt to model reproducibility is Conceptualizing Reproducibility Using Simulations and Theory (CRUST).

bookmarks for PDF

To install for Ubuntu,

sudo snap install pdftk       # version 2.02-4, or
sudo apt  install pdftk-java  # version 3.2.2-1

and for Fedora, sudo dnf install pdftk-java.

pdftk src.pdf dump_data output bookmarks.txt
pdftk target.pdf update_info bookmarks.txt output target-bm.pdf

quarto

This is extensively documented under Linux, https://cambridge-ceu.github.io/csd3/applications/quarto.html.

Under Windows, however it is simpler which involves these steps

  1. Install R, e.g., R-4.3.1

    Optionally, one installs RStudio or Visual Studio Code (Extension Quarto available, ctrl-+/- to enlarge/shrink fonts).

  2. Install python from https://www.python.org/downloads/

    rem Program files\quarto\bin\tools deno upgrade py -m pip install tinytex py -m pip install jupyter py -m pip install numpy py -m pip install matplotlib

  3. Install quarto, e.g., quato-1.3.450, from https://quarto.org

Now we intend to render matplotlib.qmd adapted from https://quarto.org, rendered by quarto render matplotlib.qmd.

---
title: "matplotlib demo"
format:
  html:
    code-fold: true
jupyter: python3
---

For a demonstration of a line plot on a polar axis, see @fig-polar.

```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
  subplot_kw = {'projection': 'polar'} 
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

Reference

Devezer B, Nardin LG, Baumgaertner B, Buzbas EO. Scientific discovery in a model-centric framework: Reproducibility, innovation, and epistemic diversity. PLoS One. 2019 May 15;14(5):e0216125. doi: 10.1371/journal.pone.0216125. eCollection 2019.