Run in the Cloud (No Install)¶
Click any badge below to open a notebook in a live Binder or Google Colab environment — all dependencies are pre-installed.
Local Setup¶
Step 1: Obtain an API Token¶
How to Get Your Token¶
Navigate to GO platform and click Sign In.
Go to Account Settings → API Tokens.
Click Generate New Token, name it (e.g., Montandon Cookbook), and copy the value immediately.
Step 2: Set Up Your Environment¶
Clone and Install¶
git clone https://github.com/IFRCGo/montandon-notebooks.git
cd montandon-notebooks
pip install uv # one-time setup
uv sync # resolves and installs all dependenciesConfigure Your Token¶
export MONTANDON_API_TOKEN='your_token_here'To make this permanent, add it to your shell profile:
echo "export MONTANDON_API_TOKEN='your_token_here'" >> ~/.bashrc
# or for zsh users:
echo "export MONTANDON_API_TOKEN='your_token_here'" >> ~/.zshrc$env:MONTANDON_API_TOKEN = "your_token_here"To make this permanent:
[System.Environment]::SetEnvironmentVariable('MONTANDON_API_TOKEN', 'your_token_here', 'User')set MONTANDON_API_TOKEN=your_token_hereTo make this permanent:
setx MONTANDON_API_TOKEN "your_token_here"Step 3: Launch Jupyter¶
uv run jupyter labNavigate to book/notebooks/ and open any recipe.
Step 4: Verify Your Setup¶
Open Recipe 1 (01_Getting_Started_Montandon_STAC_API.ipynb) and execute
the first three cells. You should see:
All libraries import without errors
The
MONTANDON_API_TOKENenvironment variable is detectedA successful connection message from the STAC API
Sample items returned from
gdacs-events
Troubleshooting¶
ImportError: No module named pystac_client
Run uv sync from the repository root to install all pinned dependencies.
401 Unauthorized from the API
Your token may be missing, invalid, or expired.
Verify the variable is set:
echo $MONTANDON_API_TOKENRe-generate a token at Go Platform
Folium maps not rendering in JupyterLab
Ensure JavaScript is enabled and try:
jupyter labextension install @jupyter-widgets/jupyterlab-managerAs a fallback, save the map to HTML: m.save("map.html") and open in a
browser.
What’s Next?¶
Start with Recipe 1 — Connecting to the STAC API
Explore the Queryables Deep Dive to master CQL2 filtering
Try modifying queries to analyse your own region or hazard type
Build your own visualisations using the helper functions from any recipe