All Collections
Literate Programming
Jupyter Notebooks: an overview
Jupyter Notebooks: an overview

With links to further resources.

Shahar Zaks avatar
Written by Shahar Zaks
Updated over a week ago

Jupyter Notebooks are a versatile and popular instance of the literate programming paradigm. Jupyter allows authors to intersperse code chunks with explanation and annotation, providing readers with more information about the intent and function of programming choices.

You can run Jupyter notebooks in two ways on Code Ocean:

  1. From the top all the way to the bottom via a master script. This is what happens when you click 'Reproducible Run' in your capsule.

  2. Interactively via a Cloud Workstation. This is akin to a more typical Jupyter notebook experience.

Reproducibly Running a Notebook via a Master Script

To publish on Code Ocean, we require that notebooks be executed as a whole, serving as a reproducible record of the analysis from start to finish. This article shows you how.

Running Notebooks Interactively

To work in a Jupyter notebook interactively, see Cloud Workstations.

To install Jupyter:

  • If you have the Conda or pip installers, add jupyter  to either.

  • Launching a Jupyter Cloud Workstation will install it automatically.

  • To install Jupyter manually, add via apt-get: python3-pip, python3-setuptools, and python3-wheel, and then via the (newly visible) pip installer, add jupyter .

Example Capsules Using Jupyter Notebooks

Further Reading

Did this answer your question?