Answered By: Tom Morrell
Last Updated: Dec 04, 2023     Views: 2043

Binder is an open-source service for making GitHub repos interactive. With the click of a button, users get a virtual compute environment where they can run your code and reproduce your results. It's also a great way to test whether you've defined all the dependencies for your project. Setting up a Binder is dependent on your programming language.
 

Python

See a demo. One approach for running a Jupyter notebook is to add a requirements.txt file to your GitHub repo listing all your Python dependencies and versions. If you need libraries that aren't installed by pip, you can also add an apt.txt file with any Linux (Debian) packages to install. Add a binder button to your repo by copying the following to your README file:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/github/repo/master)

and swapping out 'github' for your GitHub account and 'repo' for your GitHub repo name. If you want a specific Jupyter notebook to launch, add '?filepath=tccon-plotting.ipynb' to the end of the URL.
 

R

See a demo. You can generate an RStudio session by adding an install.R file with your project dependencies to your GitHub repo. Then add a runtime.txt file with the date you last tested your code. Add a Binder button by copying the following to your README:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/github/repo/master?urlpath=rstudio)

and swapping out 'AuthorCarpentry' for your GitHub account and 'repo' for your GitHub repo name.


There are lots of more configurations available at the Binder support page.

Related Topics

Looking for a specific item?

Caltech books, ebooks, & more - Catalog

Caltech subscribed journals - Journals List

Popular books - Your local library