/
Dive into Jupyter Labs

Dive into Jupyter Labs

Goals:

  • Walk through a options within a Jupyter Lab session



Initial Screen Navigation and Options

Upon connecting, you are presented with the main Jupyter Labs screen and options:

  • Drop down menu bar along the top

  • Along the left is a collapsable sidebar

  • Along the right is another sidebar

  • Main work area in the center (Starts with Launcher tab opened)

  • Along bottom is a information dock

 

Upon connecting, you are presented with the main Jupyter Labs screen and options:

  • Drop down menu bar along the top

  • Along the left is a collapsable sidebar

  • Along the right is another sidebar

  • Main work area in the center (Starts with Launcher tab opened)

  • Along bottom is a information dock

 


Drop-Down Menu Bar

Has top-level menus that expose actions available in JupyterLab with their keyboard shortcuts. The default menus are:

  • File: actions related to files and folders

  • Edit: actions related to editing documents and other activities

  • View: actions that alter the appearance of JupyterLab

  • Run: actions for running code in different activities such as notebooks and code consoles

  • Kernel: actions for managing kernels, which are separate processes for running code

  • Tabs: a list of the open documents and activities in the dock panel

  • Settings: common settings and an advanced settings editor

  • Help: a list of JupyterLab and kernel help links

JupyterLab extensions can also create new top-level menus in the menu bar.

Has top-level menus that expose actions available in JupyterLab with their keyboard shortcuts. The default menus are:

  • File: actions related to files and folders

  • Edit: actions related to editing documents and other activities

  • View: actions that alter the appearance of JupyterLab

  • Run: actions for running code in different activities such as notebooks and code consoles

  • Kernel: actions for managing kernels, which are separate processes for running code

  • Tabs: a list of the open documents and activities in the dock panel

  • Settings: common settings and an advanced settings editor

  • Help: a list of JupyterLab and kernel help links

JupyterLab extensions can also create new top-level menus in the menu bar.


Left Sidebar

Left Sidebar will have a number of default options upon launch.

  • File Browser:

    • Shown with icon

  • Run Manager:

    • Shown with icon.

    • Contains a list of tabs in the main work and of running kernels and terminals

  • Table of contents

    • Shown with icon.

  • Extension manager

    • Shown with icon.

  • Older versions may show a Command palette:

    • Shown with icon.

    • provides an easy search and run for JupyterLab commands

    • Newer versions can access this from the View drop-down option or using the keyboard shortcut Command/Ctrl Shift C.

Left Sidebar will have a number of default options upon launch.

  • File Browser:

    • Shown with icon

  • Run Manager:

    • Shown with icon.

    • Contains a list of tabs in the main work and of running kernels and terminals

  • Table of contents

    • Shown with icon.

  • Extension manager

    • Shown with icon.

  • Older versions may show a Command palette:

    • Shown with icon.

    • provides an easy search and run for JupyterLab commands

    • Newer versions can access this from the View drop-down option or using the keyboard shortcut Command/Ctrl Shift C.


Right Sidebar

Property inspector (active in notebooks)

  • Gears icon

  • Allows users to inspect properties of output and items from code or main work area

Debugger

  • Bug icon

  • Helpful when debugging code and viewing dependent functions and variables within your code


Main Work Area

  • Upon initial login, the main work area will show the JupyterLab Launcher in a tab.

  • Users can launch lab applications in a new tab from the Launcher

    • Any kernels available on the cluster will show up as a kernel option in the launcher (Usually launchable as both a Notebook or Console)

    • Additional lab applications like terminal, file editors, and help menus will show up as options below under ‘Other’

  • The main work area in JupyterLab allows users to arrange documents (notebooks, text files, etc.) and other activities (terminals, code consoles, etc.) into panels of tabs.

    • Tabs can be resized or subdivided.

    • Move a tab to a panel by dragging the tab to the center of a tab panel.

    • Subdivide a tab panel by dragging a tab to the left, right, top, or bottom of the panel.

  • Upon initial login, the main work area will show the JupyterLab Launcher in a tab.

  • Users can launch lab applications in a new tab from the Launcher

    • Any kernels available on the cluster will show up as a kernel option in the launcher (Usually launchable as both a Notebook or Console)

    • Additional lab applications like terminal, file editors, and help menus will show up as options below under ‘Other’

  • The main work area in JupyterLab allows users to arrange documents (notebooks, text files, etc.) and other activities (terminals, code consoles, etc.) into panels of tabs.

    • Tabs can be resized or subdivided.

    • Move a tab to a panel by dragging the tab to the center of a tab panel.

    • Subdivide a tab panel by dragging a tab to the left, right, top, or bottom of the panel.


Information Dock

Found along the bottom of your Jupyter Lab window, the information dock contains a few informative displays that are always visible throughout your JupyterLab Session

View Toggle

  • Toggling simple “on” removes tabs for just one main/active work area.

    • It is often useful to focus on a single document or activity without closing other tabs in the main work area.

    • Simple Interface mode enables this, while making it easy to return to your multi-activity layout in the main work area.

When turned on, looks aesthetically more like a traditional Jupyter Notebook

Active Count

  • # of active kernels

  • # of active terminals

Active work area:

  • Current mode in your highlighted working area

  • Location within the active file

  • Active file name

Notifications: Notifies users of possible updates or other JupyterLab news


Running Code from a Console

Why run your code in a console instead of a notebook?

  • Jupyter Notebooks run code in a linear fashion, based on the explicit linear order according to the cell’s placement in the notebook.

  • There are positives and negatives associated with running the cells linearly:

    • Positives:

      • Helpful because it makes the logic of the code, and project easier to understand and visualize in a step-by-step manner.

      • Understanding the origins and processes associated with data collection, computational processes, and output become more straightforward.

    • Negatives:

      • Notebooks do NOT allow code to run functions simultaneously, even when the code natively handles it.

      • Notebooks also do NOT allow code to run based on decisions or conditional statements (such as if, if/else, or switch/case statements)

  • Code consoles allow you to run code interactively in a kernel. The cells of a code console show the order in which code was executed in the kernel, as opposed to the explicit ordering of cells in a notebook document. Code consoles also display rich output, just like notebook cells.

Why run your code in a console instead of a notebook?

  • Jupyter Notebooks run code in a linear fashion, based on the explicit linear order according to the cell’s placement in the notebook.

  • There are positives and negatives associated with running the cells linearly:

    • Positives:

      • Helpful because it makes the logic of the code, and project easier to understand and visualize in a step-by-step manner.

      • Understanding the origins and processes associated with data collection, computational processes, and output become more straightforward.

    • Negatives:

      • Notebooks do NOT allow code to run functions simultaneously, even when the code natively handles it.

      • Notebooks also do NOT allow code to run based on decisions or conditional statements (such as if, if/else, or switch/case statements)

  • Code consoles allow you to run code interactively in a kernel. The cells of a code console show the order in which code was executed in the kernel, as opposed to the explicit ordering of cells in a notebook document. Code consoles also display rich output, just like notebook cells.


Widgets & Extensions

Jupyter widgets and extensions can be installed to extend functionality of Jupyter. Recommended installation method and use is covered in the following module.


Next Steps:

 

Related content

Dive into Jupyter Notebooks
Dive into Jupyter Notebooks
More like this
Launching Kernels from Conda Environments
Launching Kernels from Conda Environments
Read with this
Jupyter
Jupyter
More like this
Extend Conda Environment to Jupyter Kernel
Extend Conda Environment to Jupyter Kernel
Read with this
Problems with Jupyter
Problems with Jupyter
More like this
Create an R Kernel for a Jupyter Notebook
Create an R Kernel for a Jupyter Notebook
Read with this