Jupyter Lab

What is jupyter lab?

JupyterLab is a web-based interactive development environment for Jupyter notebooks, code, and data.
You can configure and arrange the user interface to support a wide range of workflows in data science, scientific computing, and machine learning.

What is a Jupyter notebook?

A Jupyter Notebook is an interactive environment for writing and running code. A notebook is capable of running code in a wide range of languages and may include: - Live code - Interactive widgets - Plots - Narrative text - Equations - Images - Video

These documents provide a complete and self-contained record of a computation that can be converted to various formats and shared with others using email, Dropbox, version control systems (like git/GitHub) or nbviewer.jupyter.org.

Here is a quick visual walkthrough of the jupyter lab web application interface.

Instructions:

Start the jupyter server

Before you can open, run or modify a jupyter notebook, you need to start the jupyter server.

  1. Open a new terminal and run the code below:
    jupyter lab 
    

    The jupyter server can only access notebooks from the directory (and its child directories) it was started in.

  2. The jupyter lab web application should automatically open as a tab in your default web browser. If not, copy and paste the link from the terminal in your web browser.

Open a Notebook

We will now open a jupyter notebook that will guide us thrugh some of its basic functionalities.

  1. Download the jupyter notebook: Running_code.ipynb

    Github allow you to view a notebook in the browser. However, you cannot run/modify it.

  2. In your jupyter lab web application, use the file browser (first icon on the left pane) to navigate to the notebook location.
  3. Double click on the notebook to open it.
  4. Follow the isntructions in the notebook.

Stop the jupyter server

Once you have saved your jupyter notebook, you may stop the jupyter server by pressing <CTRL+C> on your keyboard, in the terminal that is runnning the server.

References:

  1. Jupyter Lab Overview