Skip to content
Ahmad Ammar

1. Before you start

This guide is a notebook you run yourself. It tests a claim made at a conference in November 2026, that the Earth warmed fastest in 1899–1940 when CO~2~ emissions were small, using four public datasets and a few dozen lines of Python. The essay Reading climate data tells the story and the conclusions; this guide shows every step that produced them, so you can repeat, change and extend it.

1.1 What you will learn

  • Data: where climate records come from, what a temperature anomaly is, and how to download, inspect and join tables with pandas.

  • Statistics: how a trend line is fitted, by hand and with a library; what a standard error is; why neighbouring years are not independent, and how to allow for it.

  • Physics: what radiative forcing is, and how a two-reservoir energy-balance model turns forcing into temperature.

  • Figures: how to read any chart by naming its parts, and how each line and bar maps to a column of a table.

  • Practice: keeping a record of what each run used, so others can repeat it.

1.2 Getting Python and the notebook

You need Python 3.10 or newer with numpy, pandas, matplotlib and scipy. Three ways, from simplest to most flexible:

  1. Google Colab, in a web browser, with nothing to install: open the Notebooks page of this guide and choose Open in Colab. Colab already has every library used here.

  2. Anaconda or Miniforge on your own computer: install it, then in a terminal run the commands below, and open the downloaded climate_data.ipynb in the Jupyter window that appears.

  3. VS Code with its Python and Jupyter extensions: open the .ipynb file and choose a Python environment that has the four libraries.

conda create -n climate python=3.12 numpy pandas matplotlib scipy jupyterlab
conda activate climate
jupyter lab

1.3 How to read the cells

Each step below is a cell of the notebook. A box labelled In [n] is the code; the box labelled Out [n] under it is what that code printed when the notebook was run, and a figure under Out [n] is what it drew. Run the cells in order from the top: later cells use tables made by earlier ones. If you change something and want to start again, use Restart and run all.

1.4 The question and the libraries

A working paper presented at a conference in November 2026 argued that the Earth warmed fastest in 1899–1940, when carbon dioxide (CO₂) emissions were small, and concluded that CO₂ is not the main driver of warming. In this notebook we test that claim ourselves, from public data, one step at a time. By the end you will have downloaded four datasets, joined them into one table, fitted trend lines by hand and with a library, measured how uncertain those trends are, built a small physical model of the climate, and made the figures that answer the question.

Each code cell is followed by its output, exactly as it appeared when this notebook was run. Run the cells in order from the top: later cells use what earlier cells made.

We use four Python libraries. pandas holds tables (rows and columns, like a spreadsheet); numpy does arithmetic on whole columns at once; matplotlib draws figures; and scipy provides statistical tests.

In [1]
import json
import urllib.request
from pathlib import Path

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy import stats

pd.set_option("display.width", 110)
plt.rcParams.update({"figure.dpi": 110, "axes.spines.top": False, "axes.spines.right": False})
print("numpy", np.__version__, "| pandas", pd.__version__)
Out [1]
numpy 2.0.1 | pandas 2.2.3