Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Introduce what Jupyter is and why it’s useful

  • Differentiate between Jupyter Notebooks and Jupyter Labs and when to use each

  • Identify cell types in a notebook and how they’re used

  • Things that you may want to watch out for

...

Table of Contents
stylenone

...

What is Jupyter?

Jupyter, formerly known as an ipython notebook, is a popular tool used in data science and data analysis.

  • An open-source, browser-based, web application with a wide variety of functions

    • Allows users to create and share computational documents, called notebooks .

      • Notebooks facilitate the development of live code that can then be run in a number of different coding languages.

      • Code can be run step by step in “chunks” called cells.

      • Users can combine live code cells with other cells - Markdown text, images, plots, and other rich media in a single interactive canvas.

      • Can produce a wide variety of interactive output including HTML, videos, LaTeX, and custom MIME types.

      • Can be shared through e-mail, GitHub, or other cloud storage and sharing services.

      • Easily exported to other formats like, books, slides, web apps, static web pages, or PDF documents

      .

    We see this tool used for a number of things:

    • To organize work and display the thought process or logic associated with a project

    • Collaboration

    • As an IDE (Integrated Development Environment)

      • Easy to look at or run code line-by-line to simplify debugging

    • For teaching

    • Displaying and manipulating data frames
      • .

    • Allows users to run code and share ideas and share in a “live” and easily available format.

  • Requires a kernel to launch

  • A computational lab notebook that has live code which can be run in real time.

...

Jupyter is great for:

  • Learning and Sharing Ideas

  • Prototyping

  • Documenting thought processes

  • Presenting work through an interactive environment

  • Exploratory Data Analysis - Investigating and Summarizing Datasets

...

Jupyter Notebooks

  • Jupyter Notebooks are just the

...

  • Notebook application itself

    • Simple interface where users can open and run notebooks

...

A web based interactive environment in which to create Jupyter notebook documents

...

Launched from a kernel

...

    • Straightforward linear flow, where you can create and run cells in a single notebook

    • Beginners may find Notebooks easier to use, initially

  • Lacks some of the functionality of Jupyter Lab

    • Supports extensions, but the process of installing and managing them more difficult.

    • Available extensions is smaller compared to JupyterLab.

    • Does not have a built-in terminal or text editor. Users need to rely on external tools or extensions for these tasks.

jupyter notebook.pngImage Added

...

Notebook cell types

By default, there are 4 types of Notebook cells:

  • Markdown

  • Code

  • NBConvert

  • Heading

...

Jupyter Labs

  • Jupyter’s “next generation interface

...

  • to work with notebooks, code, and data

  • Includes notebooks, but extends to consoles, terminals, CSV editors, markdown editors, interactive maps

...

Jupyter Notebook cell types

  • Markdown

    • Text Cells allowing you to write and render Markdown syntax

    • This is where you describe and document your workflow

  • Code

    • Code cells allow you to write and run programming code in a language of your choosing (e.g., Python)

    • Languages supported in Jupyter include Python, R, Julia, and many others

    • On ARCC HPC resources, we support jupyter code in Python and R

  • NBConvert

    • Stands for Notebook Convert

    • Enables the conversion of your notebook to another format as given by the FORMAT string using Jinja templates.

      • Presenting: PDF

      • Publishing: LaTeX

      • Collaboration

      • Sharing: HTML

Running Jupyter from OnDemand

After logging into OnDemand on your favorite ARCC HPC resource, you can launch Jupyter from the main Dashboard:

...

Upon request, you are taken to a web form to tailor and specify the Jupyter environment you’d like to run in your session

Jupyter Interface: Select from Jupyter Notebook or Jupyter Lab

Account: The associated investment account or project you’re using to run the session

Number of hours: How long you plan to use the notebook

Number of Nodes: how many nodes you want allocated to perform work while using this notebook.

Number of CPUs: how many cores you will need access to perform your work while using this notebook.

Amount of Memory: Memory in GB required to run throughout the course of this Jupyer session

GPU Type: Which GPU hardware you’d like to perform your work in the Jupyter Notebook or Lab on

A screenshot of a computer

Description automatically generatedImage Removed

Link to main workshop page

 

Where are R Packages Installed on the Cluster?
  • , etc.

    • Users can easily write their own plugins.

    • Workspace consists of a main work area, where you can open multiple documents and activities, and a collapsible left sidebar that provides access to the file browser, running kernels and terminals, command palette, and notebook cell tools.

  • Has a modular structure, allowing you to open several notebooks and added files like HTML, Text, markdown in the same window - more like an IDE.  

...

Lab also allows users to execute code in a python console 

    • The main work area in JupyterLab uses a tab-based layout, allowing you to switch between multiple open documents easily.

    • Users can drag and drop tabs to rearrange the layout, split the view to see multiple documents side-by-side, or even create new windows for a more customized workspace.

  • Lab also allows users to execute code in a python console 

image-20240709-225657.pngImage Added

...