Basic Notebook functions
The Jupyter Notebook is an easy-to-use web application that allows you to create and share documents that contain live code in Python.
Many professionals use it for experiments and development. It is great for teaching and learning. Some even want it to become the new standard for publishing scientific papers.
Join the professionals and discover the many possibilities of a notebook: coding in Python, mathematical equations and visualisations with the help of many graphical libraries. With Markdown, a kind of markup language, you can add explanations and narrative text in a text block.
Uses include: data cleaning and transformation, numerical simulation, statistical modelling, data visualisation, machine learning and deep learning.
A Jupyter Notebook is also called a Python Notebook. It originates from the iPython Notebook. The software is open-source and free of charge.
Anaconda or Colab
When you want to work on notebooks on your own computer, you can install Anaconda. That is a complete software package with Python and R plus a lot of libraries to make your life as a data scientist more convenient.
Google Colab is an online environment for Jupyter Notebooks. It’s free of charge, you only need a Google account like GMail.
Notebook Extensions
Jupyter Notebook extensions, also called nbextensions, are add-ons and they extend the basic functionality of the notebook environment. Very useful when dealing with large notebooks, are collapsible headings. They allow you to collapse some parts of a notebook. They can also do things like autoformat your code or send a browser notification when a cell has completed.
Widgets
Ipywidgets are interactive HTML widgets. They make it possible to create graphical user interface components in a notebook, like a button or a selection box.
Voilà
But there is more. With Voilà you can turn your notebook into a web application. In Voilà the code is hidden, but the input and output fields are shown. This is handled by the ipywidgets.
When Voilà is run on a notebook, the following steps occur:
- Voilà runs the code in the notebook and collects the outputs
- The notebook and its outputs are converted to HTML. By default, the notebook code cells are hidden.
- This page is served either as a Tornado application, or via the Jupyter server.
- When users access the page, the widgets on the page have access to the underlying Jupyter kernel.
Github
Notebooks and accompanying data can be stored on Github. On Github you can make your files public and share your code. Github can open a notebook, but the code in it cannot be executed. To do so you have to import in Anaconda or Colab. However, there is another option: Binder.
Binder
If you have one or more notebooks on Github, you can bind them together and present them in an executable cloud environment.
At mybinder.org you fill in a Github repository name or URL, and Binder creates a link with your live environment.
Here is how it works:
- Enter your repository information
- Binder builds a Docker image of your repository
- Interact with your notebooks in a live environment!
It’s free of charge, but when not used for a while, the environment is closed and removed. Off course, you can create a new environment at any time. Keep in mind that you will be provided with a new URL.