Skip to content

Jupyter

Working with Jupyter Lab and Jupyter Notebook

While it is possible to write your analysis scripts in a plain editor, there are actually nicer ways of doing this, so that the scripts are easily readable and understandable by others. One way to achieve this is by using Jupyter Notebooks. In a Jupyter Notebook you can write and run code, directly see the output, and write documentation in the easily readable markdown language. It runs in your browser (Firefox, Chrome or Safari) and is available for macOS, Windows and Unix-based systems. The term Jupyter Notebook refers both to the file type, also termed Notebook files or notebooks, and the computational environment. The second however is now outdated and has been replaced by Jupyter Lab (for an overview of the differences between Jupyter Lab and Jupyter Notebook).

The notebook can run on Python, MATLAB, or R, depending on the choice of Kernel you want to use.

The Advantage of Using Jupyter

But why should we use it for data analysis? The main aspect is to simplify the documentation process. Instead of writing comments in your code, we can write formatted text in markdown, which offers functionality for formulas, emphasis, links etc.

Second, we can directly see the output our code generates, which makes working with it very intuitive.

Third, you can run Jupyter Lab in a Docker container. This enables us to share not only well documented code, but also directly provide the computational environment needed to run it.