JupyterHub
HomeServicesDocumentationBlog
1.0.0
1.0.0
  • Introduction
  • Determine Your Workflow
  • About Jupyter Notebooks
  • About JupyterHub
  • Computing Policies
  • ❓Help and Support
    • Getting Support
    • FAQ
    • Known Issues/Bugs
    • Instructor's Checklist
    • Additional Resources
  • Getting Started
    • Sign In
    • Import Notebooks
    • Launch a Notebook
    • Launch a Terminal Session
  • Using Your Hub
    • Interface Overview
    • Creating a New Blank Notebook
    • Managing Active Notebooks
    • Shutting Down Server
  • Content Sync via Link
    • Link generation
  • CONTENT SYNC VIA GIT
    • Git Overview
    • Create GitHub Account
    • Set Up Git in JupyterHub
    • Downloading Content
    • Saving and Uploading Content
    • GIT Cheatsheet
  • Github Classroom (Student Guide)
    • Getting Started
    • Getting and Uploading Assignments
  • GitHub Classroom (Instructor Guide)
    • Overview
    • Getting Started
    • Distributing Homework
    • Distributing Lectures
    • Learning Management Systems
  • ADVANCED TOPICS
    • Package Installation
    • Accessing Classic Notebook
    • Slideshow Plugin
    • VSCode
    • SQLite
    • RStudio and Shiny
    • Dash
  • Reproducibility
    • Replicating the Environment
    • Using Docker
Powered by GitBook
On this page
  • What is the Jupyter Notebook (provided by official documentation)
  • Introduction
  • Notebook web application
  • Kernels
  • Notebook documents
Export as PDF

About Jupyter Notebooks

PreviousDetermine Your WorkflowNextAbout JupyterHub

Last updated 6 years ago

What is the Jupyter Notebook (provided by official documentation)

Introduction

The Jupyter Notebook is an interactive computing environment that enables users to author notebook documents that 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, , version control systems (like git/) or .

Components

The Jupyter Notebook combines three components:

  • The notebook web application: An interactive web application for writing and running code interactively and authoring notebook documents.

  • Kernels: Separate processes started by the notebook web application that runs users' code in a given language and returns output back to the notebook web application. The kernel also handles things like computations for interactive widgets, tab completion and introspection.

  • Notebook documents: Self-contained documents that contain a representation of all content visible in the notebook web application, including inputs and outputs of the computations, narrative text, equations, images, and rich media representations of objects. Each notebook document has its own kernel.

Notebook web application

The notebook web application enables users to:

  • Edit code in the browser, with automatic syntax highlighting, indentation, and tab completion/introspection.

  • Run code from the browser, with the results of computations attached to the code which generated them.

  • See the results of computations with rich media representations, such as HTML, LaTeX, PNG, SVG, PDF, etc.

  • Create and use interactive JavaScript widgets, which bind interactive user interface controls and visualizations to reactive kernel side computations.

Kernels

Through Jupyter's kernel and messaging architecture, the Notebook allows code to be run in a range of different programming languages. For each notebook document that a user opens, the web application starts a kernel that runs the code for that notebook. Each kernel is capable of running code in a single programming language and there are kernels available in the following languages:

The default kernel runs Python code. The notebook provides a simple way for users to pick which of these kernels is used for a given notebook.

Notebook documents

Notebook documents contain the inputs and outputs of an interactive session as well as narrative text that accompanies the code but is not meant for execution. Rich output generated by running code, including HTML, images, video, and plots, is embedded in the notebook, which makes it a complete and self-contained record of a computation.

When you run the notebook web application on your computer, notebook documents are just files on your local filesystem with a .ipynb extension. This allows you to use familiar workflows for organizing your notebooks into folders and sharing them with others.

Notebooks consist of a linear sequence of cells. There are four basic cell types:

  • Code cells: Input and output of live code that is run in the kernel

  • Markdown cells: Narrative text with embedded LaTeX equations

  • Heading cells: 6 levels of hierarchical organization and formatting

  • Raw cells: Unformatted text that is included, without modification, when notebooks are converted to different formats using nbconvert

Author narrative text using the markup language.

Include mathematical equations using LaTeX syntax in Markdown, which are rendered in-browser by .

Python()

Julia ()

R ()

Ruby ()

Haskell ()

Scala ()

node.js ()

Go ()

Each of these kernels communicate with the notebook web application and web browser using a JSON over ZeroMQ/WebSockets message protocol that is described . Most users don't need to know about these details, but it helps to understand that "kernels run code."

Internally, notebook documents are data with binary values encoded. This allows them to be read and manipulated programmatically by any programming language. Because JSON is a text format, notebook documents are version control friendly.

Notebooks can be exported to different static formats including HTML, reStructeredText, LaTeX, PDF, and slide shows () using Jupyter's nbconvert utility.

Furthermore, any notebook document available from a public URL on or GitHub can be shared via . This service loads the notebook document from the URL and renders it as a static web page. The resulting web page may thus be shared with others without their needing to install the Jupyter Notebook.

Dropbox
GitHub
nbviewer.jupyter.org
Markdown
MathJax
https://github.com/ipython/ipython
https://github.com/JuliaLang/IJulia.jl
https://github.com/IRkernel/IRkernel
https://github.com/minrk/iruby
https://github.com/gibiansky/IHaskell
https://github.com/Bridgewater/scala-notebook
https://gist.github.com/Carreau/4279371
https://github.com/takluyver/igo
here
JSON
base64
reveal.js
nbviewer