Introduction

What is a notebook

  • The standard for programming in python is the .py file which can hold a block of code which can contain lines of code that allow you to export the results as visualisations or data files.
  • Jupyter Notebooks have been developed with the data science and analytical community.
  • Notebooks are a collection interactive cells which a user can run as a collection or individually, based on the current state of program.
  • Cells can be denoted as Code, Markdown or Raw Depending on use case.
    • Code cells use a process called a kernel to run programme elements in the user selected code base (e.g. Python or R).
    • Markdown cells allow the user to include formatted text and other elements (such as links and images).
    • Raw cells have no processing attached and output as plain text.

A brief history of Jupyter notebooks

  • In 2001, Fernando Perez started development of the iPython project as a way of incorporating prompts and access to previous output, as he continued development he amalgamated iPython with 2 other projects
  • In 2014, Project Jupyter was born out of the initial iPython project. The key aim was to make the project independent of a programming language and allow different code bases to use notebooks. The Name is a reference to the three initial languages: Julia, Python, and R.
  • Jupyter Notebooks and more recently Jupiter Labs are more than just the notebook, they are interactive development environments launched from the command line.
  • Jupyter notebooks are used by many online platforms and service providers including: Kaggle, Microsoft Fabric, and the NHS Federated Data Platform.

Pros and cons of using a notebook

On the plus side…

  • Notebooks are highly interactive and allow cells to be run in any order.
  • You can re-run each cell separately, so iterative testing is more granular.
  • Notebooks can be used to provide a structured report for an end user regardless of coding knowledge.

Having said that…

  • If you are not careful you can save a notebook in a state that cannot run as intended if changes are not checked.
  • It can be harder to understand complex code interactions.

Making a start

How to install and launch Jupyter in VS Code

The Toolkit

  • You will need the following pre-installed:
    • Language: Python
    • Dependency management: uv
    • Version Control: Git, GitHub Desktop
    • IDE: VS Code (or your preferred IDE)
  • You can install all these tools by running the following in PowerShell:
    • winget install astral-sh.uv Microsoft.VisualStudioCode github-desktop

Walkthrough and demonstration

if reviewing these slides this section is only available in the recording, though the initial steps used should be available on the associated Code Club site page

Resources

Thank You!


Contact:

Code & Slides:


… And don’t forget to give us your feedback.