Jupyter Notebooks in the Classroom

Eric Van Dusen

2026-11-19

Jupyter Notebooks in the Classroom

Meeting students and faculty where they are

Plan for today

Talk, 40 minutes

  • My path into notebooks
  • How notebooks grew at Berkeley
  • Design principles for faculty
  • Jupyter at UEM today
  • From notebook to LORCA

Hands-on, 40 minutes

  • Open a notebook in Google Colab
  • Reproduce a published chart on the Spanish economy
  • Change the indicator or time period
  • Discuss how to adapt it for your course

Disambiguation: what is Jupyter?

1. A file type

A notebook is an .ipynb file, stored as JSON.

One file holds Markdown text, code and the computational outputs.

2. A way to scaffold compute

The notebook plus its packages and environment files.

Together they make sure the compute works anywhere.

3. A software IDE

JupyterLab and Jupyter Notebook open and run notebook files.

You can also work in Google Colab, VS Code and others.

My path into notebooks

  • My background is in international development
  • A new role at Berkeley let me teach a new International Development course
  • The course was built on notebooks from the start
  • LS 88: Behind the Curtain in International Development

Charts from development field data, outcomes by treatment arm and diarrhea prevalence by survey round, with a photo of a community water source

A development course in notebooks

Course notebook Lec9.2-waterguard.ipynb listing seven treatment arms, from control to an incentivized promoter with a dispenser at the spring, and a code cell grouping households by treatment arm

Bar chart of mean self-reported WaterGuard use by treatment arm, with error bars; arms 5 to 7 are much higher than arms 1 to 4

Lecture 9.2, WaterGuard study notebook, fa25-student repository

The course began from questions in development economics. The notebook was the tool for working on them.

What that first course taught me

Real data

Students worked directly with development data from the first week.

Data from the WaterGuard household water treatment study.

This data was also in published journal articles.

What worked

Taking students from messy field data to the research behind Nobel-winning development economics.

What surprised me

Students with a little bit of python can do a lot on a scaffolded path

Students are hungry for real world applications

It started me on a path I am still on: helping other faculty teach with Jupyter.

Data 8: Foundations of Data Science

  • Introductory course open to students in any major
  • No prerequisites in programming or statistics
  • Real questions and real data from the first lecture
  • Python introduced as students need it, inside notebooks

Computational and Inferential Thinking, the open Data 8 textbook

Open textbook: Adhikari, DeNero and Wagner, Computational and Inferential Thinking, inferentialthinking.com

The Data Science Connectors model

  • Connector courses are taken alongside Data 8
  • Each one applies the same tools to a single discipline
  • Faculty in that discipline design and teach them
  • Students see the methods used on questions from their own field

Connectors Library listing course notebook repositories: Child Development in the Developing World, City Planning, Civil Engineering, Cognitive Science, Data 88 Economic Models, Genetics and Genomics, Demography

Connectors Library: public notebook repositories for connector courses

Data 88E: Economic Models

  • A connector course in economics
  • Economic models taught through notebooks
  • Students work with economic data alongside the theory
  • Open materials that other institutions have adapted

Data 88E Economic Models Textbook page showing an interactive 3D plot of a Cobb-Douglas utility function with a budget constraint

Data 88E: Economic Models Textbook, Budget Constraints and Utility Maximization. data-88e.github.io/textbook

Ten years of notebooks at Berkeley

10

years of notebook-based courses

Dozens

of faculty teaching with notebooks

Hundreds

of notebooks in open course materials

10,000s

of students

Most of this growth came from faculty in other departments adapting materials they had seen working.

Start from your existing assignments

  • Excel exercise or lab book
  • Same question in a notebook
  • Same learning goal
  • Begin with an assignment you already teach and trust
  • Keep the question and the data; change the tool
  • The learning goals of the course stay the same
Class demand survey responses in a Google Sheet, the same data read into a table in a notebook, and the resulting demand curve of price against cumulative count with a best-fit line

Data 88E, fall 2024: class demand survey in a spreadsheet, read into a notebook, plotted as a demand curve

Teach only the Python needed

  • Introduce code inside the notebook, at the point where it is used
  • A few operations cover most course work: load a table, select, group, plot
  • Give students working code to read and modify before they write their own
  • Leave programming courses to teach programming

How much Python does your course actually need?

Learning a new Python package

  • Read the docs
  • Supply data
  • Configure
  • Run
  • Interpret
  • In Econ 148, students meet new data and ML packages every few weeks and learn to use them productively.
    • NumPy → statsmodels → scikit-learn
  • AI tools expose similar Python interfaces and APIs, and the same pattern applies.
    • PyTorch, TensorFlow, the OpenAI API

Moving through the Data Science major is a progression of learning new Python packages.

Jupyter NumPy pandas scikit-learn PyTorch

Scaffold to the students’ level

1

Run and read

Students run prepared cells and interpret the output.

2

Modify

Students change a variable, a filter or a time period and explain the difference.

3

Write

Students write their own analysis on a new question.

Feedback through autograding

  • Tests are written into the notebook
  • Students check their work as they go
  • Instructors grade at scale with the same tests
  • Berkeley uses otter-grader, which is open source

Notebook cell running grader.check on question 4: a function named square that cubes its input fails the test, which shows the test code and the expected value of 25 for square(5)

otter-grader: otter-grader.readthedocs.io

Metacognition 1: Notebook-based instruction

  • Code, narrative, data, visualizations and results in one environment
  • Students start with real questions and working examples, then modify them
  • Programming and math concepts arrive in the context of a substantive problem

Computational and Inferential Thinking, the open Data 8 textbook

inferentialthinking.com

Is notebook-based instruction changing the way we teach computing, math and science?

Metacognition 2: Why are we learning this way?

Jupyter, NumPy, Python APIs and cloud environments are not only classroom conveniences.

They are part of the scientific and professional computing ecosystem.

  • Students learn to explore, troubleshoot, adapt and build with the same tools professionals use.
  • Students can adapt to new technologies as they emerge.
  • Notebooks suit project-based learning and work in small teams, but you have to teach some key behaviors.
  • Faculty need to keep evolving the curriculum to reflect changes in the professional ecosystem.

Metacognition 3: Teaching through the open-source stack

Data Science courses teach with open-source tools, so students learn the same stack used in research and industry.

Origins

IPython and Jupyter grew out of scientific computing and open research communities.

An open stack

Python, NumPy, pandas and Jupyter are open-source projects maintained by communities.

Reproducibility

Notebooks make methods and outputs shareable. Reproducing them also depends on environments, dependencies, data access and execution order.

I publish all my materials openly on the web, using only public data and images. I want academia to become more open.

Jupyter at UEM today

Gabriel Marín Díaz

Open data courses and reproducible articles

Marcos López-Caniego Alcarria

Notebooks for ESA Euclid mission data

Javier Acosta

AlphaFold peptide design challenge on Google Cloud

Also in development: courses by María Cruz Gaya López and José Naveiro.

Euclid notebooks: Marcos López-Caniego

JupyterCon talk by M. López-Caniego and colleagues, European Space Astronomy Centre, Madrid: Closing the loop from astronomical data exploration to scientific discovery using the Jupyterverse

Getting_started.ipynb in the euclid-jupyter-notebooks repository, section How to access Euclid data, with a table of mounted data volumes and their sizes

  • JupyterCon talk on astronomical data exploration with Jupyter
  • Getting-started notebooks for ESA Euclid mission data

López-Caniego et al., “Closing the loop from astronomical data exploration to scientific discovery using the Jupyterverse,” JupyterCon. European Space Astronomy Centre, Madrid. youtube.com/watch?v=VKOz1v3bFVk

Peptide design challenge: Javier Acosta

  • Third-year Biomedicine, Biotechnology and Pharmacy students
  • 18 mixed teams, each with a disease-linked target
  • Peptide design with AlphaFold in a Colab notebook on Google Cloud
  • Selected teams defended their results

Poster: Artificial intelligence-guided therapeutic peptide design, a challenge-based learning experience in biomedical education, showing the challenge format, a six-step computational workflow and student results

Acosta and Del Arco, “Artificial intelligence-guided therapeutic peptide design: a challenge-based learning experience in biomedical education,” ICERI 2026.

Courses in development at UEM

María Cruz Gaya López

Computación Científica I: from a CSV file to an analysis project, using NASA’s Meteorite Landings open data

Notebook meteoritos_pandas_profesor.ipynb, Computación Científica I: Meteoritos, de un fichero CSV a un proyecto de análisis, with a guided demo part and a team project part, using pandas and matplotlib

José Naveiro

Metal cutting: cutting speed and spindle speed for turning a steel shaft, calculated step by step

Notebook metal_cutting_demo.ipynb: Step 0 sets the bar diameter, cutting speed, feed, depth and length; Step 1 derives cutting speed from diameter and rpm

Notebooks in the universidad-europea-collab repository on GitHub

From notebook to LORCA

  • Notebook in Colab
  • Jupyter on LORCA
  • Research computing
  • LORCA: Laboratorio Optimizado de Recursos de Computación Avanzada
  • Students who can use Jupyter and Python can use LORCA
  • 16 nodes with 1,200 CPU cores, 1.9 TB of RAM, 42 TB of storage and 10 NVIDIA GPUs

Eric Van Dusen in front of the glass wall of the LORCA lab at Universidad Europea, with the LORCA infrastructure monitor on a screen behind the glass

Hands-on

Reproducing a chart about the Spanish economy

How to get to the notebook

github.com/ericvd-ucb

  • universidad-europea-collab repo
  • README
  • Open in Colab link
  • Sign in with a Google account
  • Nothing to install

github.com/ericvd-ucb/universidad-europea-collab

Some notes on Colab

No sense of paths

Be careful how you address files that go with the notebook.

I point to files by their address on GitHub.

AI help built in

Colab has an AI assistant installed.

It will suggest code as you type.

Good for group work

Share one notebook with a group.

Students can work in it together.

Can we reproduce this chart?

Spanish news graphic: headline says the labor market has gained 18 to 19 percent more workers while unemployment fell to its lowest since 2008; area chart of employed persons (EPA) and Social Security affiliates from 1996 to 2026, shaded by the terms of Aznar, Zapatero, Rajoy and Sánchez

  • A chart of employment in Spain by presidential term, shared on social media and in the press
  • Two series: employed persons in the EPA survey and workers registered with Social Security
  • We will find the data, rebuild the chart and check the headline

The question is about data and careful reading, not about politics.

El Diario, Instagram post. instagram.com/p/DeXZ-VrGlI6

Notebook basics in Colab

spain_economy_by_term.ipynb open in Google Colab, with the toolbar showing Code, Text, Run all and Copy to Drive, a code cell that plots employment, and the resulting chart shaded by the terms of Aznar, Zapatero, Rajoy and Sánchez

  • Text cells and code cells
  • Run a cell with Shift + Enter
  • Run cells in order, from the top
  • Save a copy to your own Drive

Steps for the session

  • Open spain_economy_by_term.ipynb from the README
  • Run the cells that load the data
  • Reproduce the published chart
  • Change an indicator or time period
  • Discuss how you would adapt this for your course

Discussion

How would you adapt this for your own course?

  • Which existing assignment could become a notebook?
  • What data do your students already use?
  • What would students need to know first?

Materials: github.com/ericvd-ucb/universidad-europea-collab