Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Different options to work with notebooks

In this course, we work almost entirely with Jupyter notebooks (.ipynb). Before we start coding, you need one practical decision:

Where will your notebook run?

Your main options to run notebooks are:

There is no single “best” option. Use what fits your setup and learning goals.

This page gives you a quick overview of the main options. The hands-on practice (editing cells, running code, restart & run all, avoiding hidden state) is covered in the Practical section.

1. Running online

Option 1: Using Colab

Google Colab is a free online service that lets you run notebooks in the cloud without installing anything locally.

For this course, Colab is the recommended option if you want to get started quickly and run notebooks online.

Click the “Open in Colab” button at the top of this page.
This opens a copy of the notebook directly from GitHub, where you can run and modify the code interactively.


Option 2: Using Binder

Binder is another free online service that lets you run Jupyter notebooks in the cloud without local installation.

Binder launches a temporary Jupyter environment based on the course GitHub repository. Startup can take a minute or two, especially when many users access Binder at the same time.

The launch button (🚀) in the top right corner starts a temporary Binder session, when you copy https://mybinder.org` as the URL placeholder. Once launched you can run the notebook in your browser.


Option 3: In-page execution

This Jupyter Book supports in-page execution (temporary cloud kernel), which allows you to run code cells directly on this page, without opening a separate notebook interface.

When you click the power button (⏻, top of the page), a temporary cloud-based Jupyter kernel is started in the background. Once the session is ready, you can execute the code cells on this page and view the outputs inline.


2. Running locally

Running notebooks locally is the best option if you want to keep using Python beyond this course or work on larger projects.

To run notebooks locally, you need:

Setup instructions are in:


Option 1: JupyterLab

The GitLab repository below contains all exercises, practicals, and solutions in Jupyter Notebook format (.ipynb).
Throughout the semester, new notebooks will be added weekly.
Make sure you update your local copy regularly.

  1. Download the SDS210 repository and extract it to a suitable location on your computer.

  2. If you have not yet installed Conda, download and install Miniconda Follow the default installation settings described in the Setup section on Conda.

  3. Open Anaconda Prompt (Win) or your Terminal (Mac) to run the following commands:

# Update conda (recommended)
conda update -n base -c defaults conda

# Navigate to the extracted SDS210 folder
cd <path-to-sds210-repository-folder>

# Create the environment (only once)
conda env create -f environment.yml

# Activate the environment
conda activate sds210

# Start JupyterLab
jupyter lab

JupyterLab will start in the folder from which you launched it. You can now open any notebook (.ipynb) in the interface.


Option 2: VS Code

You can also use VS Code with the Python and Jupyter extensions.

In that case:

  1. Activate your Conda environment.

  2. Open your project folder in VS Code.

  3. Open the .ipynb file.

  4. Select the correct Python kernel if prompted.

Both installation and environment setup are explained in the Conda and VS Code Setup sections. VS Code provides a notebook interface similar to JupyterLab, but integrated into a full code editor.


See the Setup chapter for detailed instructions on:

Running notebooks locally gives you:


3. Summary

Here is a quick comparison of your options:

OptionInstallation neededPersistent workBest for
ColabNoYes (if saved)Quick start, easy access
BinderNoNoTemporary testing in Jupyter
In-page ⏻NoNoSmall experiments on the book page
Local (JupyterLab/VS Code)YesYesProjects, long-term use

This page introduced the different ways to run notebooks:

Next, go to the Practical section to actually run cells, restart the kernel, and learn how to avoid hidden state.