Skip to content

pysepty/notebooks

 
 

Repository files navigation

notebooks

This is a small repository containing all you need to set up jupyter notebooks for use with Mybinder. mybinder.org creates a docker file that it then launches for you in the Jupyter Notebook exectuable environment (jupyterhub). This means, that if you clicked on the binder button below:

Binder

...you'd get a version of this repository as it currently exists. You would then be able to create new python or R notebooks and run the code, writing your analysis and your code together. You could also open a terminal within Jupyter and use git to push any changes you make back to this repository.

Of course, we want you to make changes, add more notebooks, and save them in your own repo. To do that, click on the 'fork' button to copy this repository to your own space. Then, edit the README.md file to change the mybinder URL to your GitHub username. For example:

[![Binder](https://mybinder.org/badge.svg)](http://mybinder.org/v2/gh/benmarwick/notebooks/master)

will become

[![Binder](https://mybinder.org/badge.svg)](http://mybinder.org/v2/gh/yourgithubusername/notebooks/master)

Then commit your change and push to GitHub. Then you can click on the pink 'launch binder' button and you will get a Juptyer notebook that is connected to your GitHub repo. So, hit 'launch'. If you click on 'build logs - show' you'll see the computer working away to launch your environment. Sometimes this fails; just reload and be patient.

Once you're in the notebook environment, you can make new notebooks using R or Python. If you find that you're installing lots of packages for R or python, you can preload these in the future by putting the relevant information in a file in your repository called install.R or requirements.txt, respectively. In this repo you can see our example.install.R or example.requirements.txt to see how new packages should be listed. When mybinder launches, it will install those packages automatically if install.R or requirements.txt are present.

When you create new notebooks, you can download them to your local computer (tick the box beside their name on the 'home' screen, then 'download'). Or you can use git to push them to your repository:

  1. open a new terminal in Jupyter in mybinder by clicking on new -> terminal.
  2. Then, git add .
  3. Make a note of why you're pushing changes with git commit -m "message"
  4. Then git push -u origin master. The machine will ask for your username and password.

..and in this way your notebooks are saved to the same GitHub repository, and thus under version control, so you can collaborate or restore to earlier versions.

About

jupyter notebooks for use with mybinder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 98.6%
  • Shell 1.4%