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.

Disaster Data Analytics

Recipe 1 — Connecting to the Montandon STAC API

IFRC

Environment Setup

Binder
Google Colab
Local

All dependencies are pre-installed. Click Launch Binder at the top of the page — no setup needed.

Step 1 — Setup and Library Imports

All libraries imported successfully!

Step 2 — Authenticating with the Montandon STAC API

The API requires a Bearer Token issued by the IFRC GO Platform. Tokens are passed in the Authorization header of every request.

======================================================================
AUTHENTICATION REQUIRED
======================================================================

The Montandon STAC API requires a Bearer Token for authentication.

How to get your token:
  1. Visit: https://goadmin-stage.ifrc.org/
  2. Log in with your IFRC credentials
  3. Generate an API token from your account settings

Alternatively, set the MONTANDON_API_TOKEN environment variable:
  PowerShell: $env:MONTANDON_API_TOKEN = 'your_token_here'
  Bash: export MONTANDON_API_TOKEN='your_token_here'

======================================================================

[OK] Connected to: https://montandon-eoapi-stage.ifrc.org/stac
[OK] API Title: stac-fastapi
[OK] Authentication: Bearer Token (OpenID Connect)
[OK] Auth Provider: https://goadmin-stage.ifrc.org/o/.well-known/openid-configuration

Checking API Conformance

What is STAC conformance?

A conformant STAC API declares which specification classes it supports (e.g., Item Search, Filter, Sort) via the /conformance endpoint. This tells client libraries which features are available Radiant Earth Foundation (2024).

API Connection Verified
============================================================
Connected to: https://montandon-eoapi-stage.ifrc.org/stac
API Title: stac-fastapi

The API is ready for data queries.
You can now explore collections and search for disaster event data.
✅ PySTAC helper function initialized (using client.search())

Step 3 — Exploring Available Collections

Montandon organises its catalogue into collections that follow a <source>-<type> naming convention:

Events
Hazards
Impacts

Main disaster occurrence records — one item per discrete event. Collections: gdacs-events, emdat-events, glide-events, etc.

Fetching all collections...

============================================================
Total Collections Available: 29
============================================================

Loading...

Categorising Collections by Type

The helper below groups all collections into Events, Hazards, and Impacts using simple string matching on the collection ID.

Collections by Type:

Events Collections (12):
   • desinventar-events
   • emdat-events
   • gdacs-events
   • gfd-events
   • glide-events
   • ibtracs-events
   • idmc-gidd-events
   • idmc-idu-events
   • ifrcevent-events
   • pdc-events
   • reference-events
   • usgs-events
Hazards Collections (8):
   • emdat-hazards
   • gdacs-hazards
   • gfd-hazards
   • glide-hazards
   • ibtracs-hazards
   • ifrcevent-hazards
   • pdc-hazards
   • usgs-hazards
Impacts Collections (9):
   • desinventar-impacts
   • emdat-impacts
   • gdacs-impacts
   • gfd-impacts
   • idmc-gidd-impacts
   • idmc-idu-impacts
   • ifrcevent-impacts
   • pdc-impacts
   • usgs-impacts

Categorising by Data Source

Each source prefix (e.g., gdacs, emdat, usgs) denotes an upstream provider. The cell below extracts these prefixes automatically.

Collections by Data Source:

DESINVENTAR (2 collections):
   • desinventar-events
   • desinventar-impacts

EMDAT (3 collections):
   • emdat-events
   • emdat-hazards
   • emdat-impacts

GDACS (3 collections):
   • gdacs-events
   • gdacs-hazards
   • gdacs-impacts

GFD (3 collections):
   • gfd-events
   • gfd-hazards
   • gfd-impacts

GLIDE (2 collections):
   • glide-events
   • glide-hazards

IBTRACS (2 collections):
   • ibtracs-events
   • ibtracs-hazards

IDMC (4 collections):
   • idmc-gidd-events
   • idmc-gidd-impacts
   • idmc-idu-events
   • idmc-idu-impacts

IFRCEVENT (3 collections):
   • ifrcevent-events
   • ifrcevent-hazards
   • ifrcevent-impacts

PDC (3 collections):
   • pdc-events
   • pdc-hazards
   • pdc-impacts

REFERENCE (1 collections):
   • reference-events

USGS (3 collections):
   • usgs-events
   • usgs-hazards
   • usgs-impacts

Deep Dive — Examining a Single Collection

Let’s inspect the gdacs-hazards collection to understand its spatial and temporal extent, keywords, and data providers.

Collection Details: gdacs-hazards

Title: GDACS Hazards
Description: Hazard records from the Global Disaster Alert and Coordination System (GDACS). GDACS is a cooperation framework between the United Nations, the European Commission and disaster managers worldwide to improve alerts, information exchange and coordination in the first phase after major sudden-onset disasters. It provides detailed hazard information including affected areas, alert levels, and severity scores for earthquakes, tsunamis, floods, tropical cyclones, volcanic eruptions, and wildfires. Each hazard includes specific information based on the hazard type and uses specialized models for assessment. More information on the GDACS mapping in Monty can be found in the [GDACS Hazard Source Mappings](https://github.com/IFRCGo/monty-stac-extension/tree/main/model/sources/GDACS#hazard-item).
License: MIT

Spatial Extent:
   Bounding Box: [[-180, -90, 180, 90]]

Temporal Extent:
   Intervals: [[datetime.datetime(2000, 1, 1, 0, 0, tzinfo=tzutc()), None]]

Keywords: gdacs, hazard, natural hazard, hazard footprint, hazard severity, earthquake intensity, flood extent, cyclone path, tsunami wave height, volcanic ash cloud, drought severity, wildfire extent, early warning, risk assessment, hazard modeling, global

Providers:
   • GDACS (['producer'])

Step 4 — Basic Data Retrieval

With the connection established we can start querying items. The examples below progress from the simplest possible search to multi-filter queries.

4.1 Minimal Query — Retrieve 10 Items

The simplest call: just pass a collection name and a max_items limit.

✅ Retrieved 10 items from gdacs-hazards collection

📄 First Item Details:
ID: gdacs-hazard-1514353-1676468
Collection: gdacs-hazards
Geometry Type: Point

Properties:
  • roles: ['source', 'hazard']
  • title: Earthquake in Colombia
  • source: NEIC
  • datetime: 2025-12-10T08:27:06Z
  • keywords: ['Geological', 'Seismic', 'COL', 'Earthquake']
  • description: Green M 5.5 Earthquake in Colombia at: 10 Dec 2025 08:27:06.
  • end_datetime: 2025-12-10T08:27:06Z
  • monty:etl_id: 6c6185c9-68a6-4f70-863c-5bcfed162c25
  • severitydata: {'severity': 5.5, 'severitytext': 'Magnitude 5.5M, Depth:140.692km', 'severityunit': 'M'}
  • monty:corr_id: 20251210-COL-GH0101-1676468-GCDB

4.2 Using the Convenience Wrapper

The search_stac() helper (defined above) centralises all search parameters and returns a plain Python list of pystac.Item objects.

📡 PySTAC Client Response

📊 Results:
  • Number of Items: 5
  • Collection: gdacs-hazards

 Item IDs:
  • gdacs-hazard-1514353-1676468
  • gdacs-hazard-1514350-1676464
  • gdacs-hazard-1514341-1676453
  • gdacs-hazard-1514332-1676442
  • gdacs-hazard-1514294-1676432

Step 5 — Advanced Filtering Techniques

The Montandon API supports CQL2-JSON Open Geospatial Consortium (2023) filters, enabling complex temporal, spatial, and property-based queries in a single request.

5.1 Temporal Filtering — Date Range

Filter items by a datetime window using the standard datetime parameter (ISO 8601 interval).

📅 Searching for events between:
   Start: 2025-09-11
   End: 2025-12-10

✅ Found 20 events in the last 90 days

📋 Recent Events:
  1. Earthquake in Colombia - 2025-12-10T08:27:06Z
  2. Earthquake in Indonesia - 2025-12-10T07:42:55Z
  3. Earthquake in Chile - 2025-12-10T06:38:27Z
  4. Earthquake in Volcano Islands, Japan Region - 2025-12-10T05:18:49Z
  5. Earthquake in Russia - 2025-12-09T23:19:52Z

5.2 Spatial Filtering — Bounding Box

Pass a bbox ([min_lon, min_lat, max_lon, max_lat]) to restrict results to a geographic rectangle.

🗺️ Searching for events in Southeast Asia
   Bounding Box: [95.0, -10.0, 141.0, 28.0]

✅ Found 30 events in Southeast Asia

📊 Events by Collection:
  • gdacs-events: 14 events
  • usgs-events: 16 events

5.3 Combined Filters — Space + Time

Temporal and spatial parameters can be combined freely:

🔍 Searching for 2024 events in Europe

✅ Found 50 events in Europe during 2024

📋 Sample Events:

  1. ID: emdat-event-2024-0960-TUN
     Collection: emdat-events
     Title: Water in Tunisia of December 2024
     Date: 2024-12-31T00:00:00Z
     Country: ['TUN']

  2. ID: emdat-event-2024-0954-ITA
     Collection: emdat-events
     Title: Water in Italy of December 2024
     Date: 2024-12-31T00:00:00Z
     Country: ['ITA']

  3. ID: emdat-event-2024-0949-ESP
     Collection: emdat-events
     Title: Water in Spain of December 2024
     Date: 2024-12-26T00:00:00Z
     Country: ['ESP']

5.4 CQL2-JSON Filters — Case Study: Spain Floods

Common Query Language 2 (CQL2) Open Geospatial Consortium (2023) enables powerful server-side filtering on any queryable property. The filter below combines three conditions with a logical AND:

OperatorPurposeField
a_containsCountry code matches ESPmonty:country_codes
a_overlapsHazard codes include flood typesmonty:hazard_codes
t_intersectsDatetime falls within Oct–Nov 2024datetime

5.5 Event → Hazard Correlation

Every Montandon item carries a correlation ID (monty:corr_id). Items with the same correlation ID describe different facets of the same real-world occurrence — enabling event → hazard → impact joins.

✅ Found 4 flood events in Spain (Oct 20 - Nov 5, 2024)

📋 All 4 Spain Late October/Early November Flood Events:


1. Event Details:
   ID: gdacs-event-1102983
   Title: Flood in Spain
   Date: 2024-10-27T15:00:00Z
   Collection: gdacs-events
   Countries: ['ESP']
   Hazard Codes: ['FL']
   Correlation ID: 20241027-ESP-NAT-HYD-FLO-FLO-1-GCDB

2. Event Details:
   ID: glide-event-FL-2024-000199-ESP
   Title: 
   Date: 2024-10-27T00:00:00Z
   Collection: glide-events
   Countries: ['ESP']
   Hazard Codes: ['nat-hyd-flo-flo', 'FL']
   Correlation ID: 20241027-ESP-NAT-HYD-FLO-FLO-1-GCDB

3. Event Details:
   ID: emdat-event-2024-0796-ESP
   Title: Flood (General) in Spain
   Date: 2024-10-27T00:00:00Z
   Collection: emdat-events
   Countries: ['ESP']
   Hazard Codes: ['nat-hyd-flo-flo']
   Correlation ID: 20241027-ESP-NAT-HYD-FLO-FLO-1-GCDB

4. Event Details:
   ID: gdacs-event-1102955
   Title: Flood in Spain
   Date: 2024-10-11T01:00:00Z
   Collection: gdacs-events
   Countries: ['ESP']
   Hazard Codes: ['FL']
   Correlation ID: 20241011-ESP-NAT-HYD-FLO-FLO-1-GCDB
🔗 Found 2 unique correlation IDs from Spain flood events

================================================================================

📍 CORRELATION ID 1/2: 20241011-ESP-NAT-HYD-FLO-FLO-1-GCDB
================================================================================

✅ Found 1 hazard(s) across collections: glide-hazards, gdacs-hazards, usgs-hazards, reference-hazards

📦 Collection: gdacs-hazards (1 hazard)
--------------------------------------------------------------------------------

  1. Hazard ID: gdacs-hazard-1102955-1
     Date: 2024-10-11T01:00:00Z
     Title: Flood in Spain
     Severity: 0.5 GDACS Severity Score
     Cluster: nat-hyd-flo-flo


📍 CORRELATION ID 2/2: 20241027-ESP-NAT-HYD-FLO-FLO-1-GCDB
================================================================================

✅ Found 3 hazard(s) across collections: glide-hazards, gdacs-hazards, usgs-hazards, reference-hazards

📦 Collection: gdacs-hazards (2 hazards)
--------------------------------------------------------------------------------

  1. Hazard ID: gdacs-hazard-1102983-2
     Date: 2024-10-27T15:00:00Z
     Title: Flood in Spain
     Severity: 0.5 GDACS Severity Score
     Cluster: nat-hyd-flo-flo

  2. Hazard ID: gdacs-hazard-1102983-1
     Date: 2024-10-27T15:00:00Z
     Title: Flood in Spain
     Severity: 1.5 GDACS Severity Score
     Cluster: nat-hyd-flo-flo

📦 Collection: glide-hazards (1 hazard)
--------------------------------------------------------------------------------

  1. Hazard ID: glide-hazard-FL-2024-000199-ESP
     Date: 2024-10-27T00:00:00Z
     Title: 
     Severity: N/A glide
     Cluster: nat-hyd-flo-flo


================================================================================

🎯 FINAL SUMMARY
================================================================================
Total Correlation IDs: 2
Total Hazards Found: 4

📊 Hazards by Collection:
  • gdacs-hazards: 3 hazards
  • glide-hazards: 1 hazard

5.6 Retrieving Impact Records

Using the same country- and hazard-code filters, we can pull impact items across gdacs-impacts, emdat-impacts, idmc-gidd-impacts, and idmc-idu-impacts.

🔍 Searching for impacts related to Spain flood events

================================================================================
✅ Found 46 impact(s) across collections: gdacs-impacts, emdat-impacts, idmc-gidd-impacts, idmc-idu-impacts

🔍 DIAGNOSTIC: Examining Impact Data Structure

================================================================================

📦 Collection: idmc-idu-impacts
Impact ID: idmc-idu-impact-28064168623-displaced
--------------------------------------------------------------------------------

📋 All Properties:
  roles: ['source', 'impact']
  title: Spain: Flood - Andalusia (Málaga) - 13/11/2024
  sources: Local Authorities
  datetime: 2024-11-13T00:00:00Z
  location: Alhaurín de la Torre, Malaga, Andalusia, Spain; Álora, Malaga, Andalusia, Spain; Cártama, Malaga, Andalusia, Spain; Málaga, Malaga, Andalusia, Spain; Pizarra, Malaga, Andalusia, Spain; Vélez-Málaga, La Axarquía, Malaga, Andalusia, Spain
  description:  **Spain: 4,210 displacements, 13 November - 14 November**    
 According to local authority, a total of 4210 people were displaced in Álora, Cártama, Alhaurín de la Torre, Pizarra, Málaga, Vélez-Málaga due to flood on 13 November.   
 [Local Authorities - 14 November 2024](https://www.juntadeandalucia.es/presidencia/portavoz/emergencias112/198838/suspension/clases/Malaga/Granada/Sevilla/Cadiz/Huelva/balance/incidencias/dana/andalucia/desalojos/avisosmeteorologicos/recomendaciones)
  end_datetime: 2024-11-14T00:00:00+00:00
  monty:etl_id: ac352e3d-f395-4b61-8b74-0d339fdd587a
  monty:corr_id: 20241113-ESP-NAT-HYD-FLO-FLO-1-GCDB
  start_datetime: 2024-11-13T00:00:00+00:00
  monty:hazard_codes: ['nat-hyd-flo-flo']
  monty:country_codes: ['ESP']
  monty:impact_detail:
    type: displaced_internal
    unit: count
    value: 4210
    category: people
    estimate_type: primary
  monty:episode_number: 1

⚡ monty:impact_detail structure:
    type: displaced_internal
    unit: count
    value: 4210
    category: people
    estimate_type: primary

================================================================================

📦 Collection: idmc-gidd-impacts
Impact ID: idmc-gidd-impact-28064168623-Internal Displacements
--------------------------------------------------------------------------------

📋 All Properties:
  roles: ['source', 'impact']
  title: Internal Displacements-Person-Person-Spain: Flood - Andalusia (Málaga) - 13/11/2024
  country: Spain
  sources: ['Local Authorities']
  datetime: 2024-11-13T00:00:00Z
  keywords: ['Flooding', 'Water-related', 'ESP', 'Meteorological & Hydrological']
  location: ['Álora, Malaga, Andalusia, Spain', 'Cártama, Malaga, Andalusia, Spain', 'Alhaurín de la Torre, Malaga, Andalusia, Spain', 'Pizarra, Malaga, Andalusia, Spain', 'Málaga, Malaga, Andalusia, Spain', 'Vélez-Málaga, La Axarquía, Malaga, Andalusia, Spain']
  publishers: ['Local Authorities']
  figure_unit: Person
  end_datetime: 2024-11-14T00:00:00Z
  figure_cause: Disaster
  monty:etl_id: 83d5fab7-4dc9-4c07-a1ea-b396ac6133e4
  location_type: ['Origin', 'Origin', 'Origin', 'Origin', 'Origin', 'Origin']
  monty:corr_id: 20241113-ESP-MH0600-1-GCDB
  start_datetime: 2024-11-13T00:00:00Z
  figure_category: Internal Displacements
  location_accuracy: ['County/City/town/Village/Woreda (ADM3)', 'County/City/town/Village/Woreda (ADM3)', 'County/City/town/Village/Woreda (ADM3)', 'County/City/town/Village/Woreda (ADM3)', 'County/City/town/Village/Woreda (ADM3)', 'County/City/town/Village/Woreda (ADM3)']
  monty:hazard_codes: ['MH0600', 'FL', 'nat-hyd-flo-flo']
  geographical_region: Europe and Central Asia
  monty:country_codes: ['ESP']
  monty:impact_detail:
    type: displaced_internal
    unit: count
    value: 4210
    category: people
    estimate_type: primary
  monty:episode_number: 1

⚡ monty:impact_detail structure:
    type: displaced_internal
    unit: count
    value: 4210
    category: people
    estimate_type: primary

================================================================================

📦 Collection: emdat-impacts
Impact ID: emdat-impact-2024-0839-ESP-total_dam
--------------------------------------------------------------------------------

📋 All Properties:
  roles: ['source', 'impact']
  title: Flood (General) in Spain - total_dam
  datetime: 2024-11-13T00:00:00Z
  description: Flood in Álora, Cártama, Alhaurín de la Torre, Pizarra municipalities and Malaga city (Malaga); Catalonia province, Spain of November 2024
  end_datetime: 2024-11-14T00:00:00Z
  monty:etl_id: cbea5a9f-dcc2-4e34-ad2f-02f5583c716b
  monty:corr_id: 20241113-ESP-NAT-HYD-FLO-FLO-1-GCDB
  start_datetime: 2024-11-13T00:00:00Z
  monty:hazard_codes: ['nat-hyd-flo-flo']
  monty:country_codes: ['ESP']
  monty:impact_detail:
    type: cost
    unit: count
    value: 50000.0
    category: total_affected
    estimate_type: primary
  monty:episode_number: 1

⚡ monty:impact_detail structure:
    type: cost
    unit: count
    value: 50000.0
    category: total_affected
    estimate_type: primary

================================================================================
Impact Data Summary
================================================================================
Total Impacts: 46

DataFrame Shape: (46, 10)
Columns: ['Impact ID', 'Collection', 'Correlation ID', 'Date', 'Title', 'Category', 'Type', 'Value', 'Unit', 'Estimate Type']

================================================================================

All Impacts Table:

Loading...

================================================================================

Summary by Category and Type:

Loading...

Summary & Key Takeaways

Key Properties Reference

Table 1:Core Montandon STAC Properties

PropertyDescriptionExample
monty:corr_idCorrelation ID linking events, hazards, impacts20241113-ESP-NAT-HYD-FLO-FLO-1-GCDB
monty:country_codesISO 3166-1 alpha-3 country codes['ESP']
monty:hazard_codesHazard classification codes['nat-hyd-flo-flo', 'FL']
monty:impact_detailImpact metrics (category, type, value, unit)see above
datetimeEvent timestamp (ISO 8601)2024-11-13T00:00:00Z
Case Study Results: Spain Floods Oct–Nov 2024

Events found: 4 (GDACS 1102983, GLIDE FL-2024-000199-ESP, EMDAT 2024-0796, GDACS 1102955)

Hazards found: 4 total (3 GDACS, 1 GLIDE)

Impacts found: 46 total — 7 EMDAT, 20 GDACS, 14 IDMC-GIDD, 5 IDMC-IDU

Primary impact types: internal displacements (4 210+ people), economic costs (50 000+), affected population counts. Data spans November 2024 with focus on Andalusia (Málaga, Granada).


Practice Exercise


References
  1. European Commission Joint Research Centre. (2024). Global Disaster Alert and Coordination System (GDACS). https://www.gdacs.org
  2. Guha-Sapir, D. (2024). EM-DAT: The Emergency Events Database. Centre for Research on the Epidemiology of Disasters (CRED). https://www.emdat.be
  3. Asian Disaster Reduction Center. (2024). GLobal IDEntifier Number (GLIDE). https://glidenumber.net
  4. Internal Displacement Monitoring Centre. (2024). IDMC Global Internal Displacement Database. https://www.internal-displacement.org
  5. Element 84. (2024). pystac-client: Python client for searching STAC APIs. https://github.com/stac-utils/pystac-client
  6. Radiant Earth Foundation. (2024). SpatioTemporal Asset Catalog (STAC) Specification. https://stacspec.org
  7. Open Geospatial Consortium. (2023). OGC API — Features — Part 3: Filtering (CQL2). https://docs.ogc.org/is/21-065r2/21-065r2.html
  8. IFRC. (2024). Monty STAC Extension Specification. https://ifrcgo.org/monty-stac-extension/