@@ -54,24 +54,77 @@ faster access to cloud resources:
5454- [ Deepnote] ( https://deepnote.com/ ) allows real-time collaboration
5555
5656
57- ## Sharing dynamic notebooks using [ Binder] ( https://mybinder.org/ )
58-
59- ::::{challenge} Exercise/demo: Making your notebooks reproducible by anyone (15 min)
60- Instructor demonstrates this:
61- - First we look at the statically rendered version of the [ example
62- notebook] ( https://github.com/workshop-material/classification-task/blob/main/example.ipynb )
63- on GitHub and also [ nbviewer] ( https://nbviewer.jupyter.org/ ) .
64- - Visit [ https://mybinder.org ] ( https://mybinder.org ) :
65- :::{figure} binder.jpg
66- :alt: Screenshot from mybinder.org user interface
67- :::
68- - Check that your notebook repository now has a "launch binder"
69- badge in your ` README.md ` file on GitHub.
70- - Try clicking the button and see how your repository is launched
71- on Binder (can take a minute or two). Your notebooks can now be
72- explored and executed in the cloud.
73- - Enjoy being fully reproducible!
74- ::::
57+ ## Sharing dynamic notebooks on [ Binder] ( https://mybinder.org )
58+
59+ ````` {exercise} Exercise (20 min): Making your notebooks reproducible by anyone via Binder
60+ - Create a new GitHub repository and **click on "Add a README file"**: <https://github.com/new>
61+
62+ - This exercise can be done entirely through the GitHub web interface (but
63+ using the terminal is of course also OK). You can use the "Add file" button
64+ to upload files:
65+ ```{figure} img/github-upload.png
66+ :alt: Screenshot of Binder web interface
67+
68+ Screenshot of Binder web interface.
69+ ```
70+
71+ ````{tabs}
72+ ```{group-tab} Jupyter Notebooks
73+ - Upload the notebook which we have created earlier to this repository. If you got stuck earlier,
74+ you can download [this notebook](https://raw.githubusercontent.com/coderefinery/jupyter/main/example/darts.ipynb)
75+ (right-click, "Save as ..."). You can also try this with a different notebook.
76+
77+ - Add also a `requirements.txt` file which contains (adapt this if your notebook has other dependencies):
78+ ```
79+ numpy==1.26.4
80+ matplotlib==3.4.1
81+ ```
82+ ```
83+ ```{group-tab} R Markdown/R Studio project
84+ This exercise is for those who use Rmd files instead of Jupyter notebooks.
85+
86+ - Upload or push your Rmd file to this GitHub repository.
87+
88+ - Add a file `runtime.txt` which specifies the R version you want to use:
89+ ```
90+ r-3.6-2020-10-13
91+ ```
92+
93+ - Add a file `install.R` which lists the dependencies, for instance:
94+ ```
95+ install.packages(c("readr", "ggplot2"))
96+ ```
97+
98+ - After you have done that, visit
99+ https://mybinder.org/v2/gh/**USER**/**REPOSITORY**/**BRANCH**?urlpath=rstudio (adapt
100+ "USER", "REPOSITORY", and "BRANCH").
101+
102+ - For more information, see [this
103+ guide](https://github.com/alan-turing-institute/the-turing-way/blob/master/workshops/boost-research-reproducibility-binder/workshop-presentations/zero-to-binder-r.md).
104+ ```
105+ ````
106+
107+ - Visit [https://mybinder.org](https://mybinder.org):
108+ ```{figure} img/binder.jpg
109+ :alt: Screenshot of Binder web interface
110+
111+ Screenshot of Binder web interface.
112+ ```
113+ - Copy-paste the markdown text for the mybinder badge into a README.md file in your notebook repository.
114+
115+ - Check that your notebook repository now has a "launch binder"
116+ badge in your `README.md` file on GitHub.
117+
118+ - Try clicking the button and see how your repository is launched
119+ on Binder (can take a minute or two). Your notebooks can now be expored and executed in the cloud.
120+
121+ - Enjoy being fully reproducible!
122+ `````
123+
124+ ``` {keypoints} More examples with Binder:
125+ - [Binder documentation](https://mybinder.readthedocs.io/en/latest/introduction.html)
126+ - [Collection of example repositories](https://github.com/binder-examples)
127+ ```
75128
76129
77130## How to get a digital object identifier (DOI)
0 commit comments