COVID-19 notice

Some services may have changed as a result of COVID-19. Please check our COVID-19 guide for more information.

Answered By: Tom Morrell
Last Updated: Apr 18, 2019     Views: 223

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.


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:


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. 


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:


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.