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 6 — Cyclone Track Animation

IFRC

What you will learn:

  1. Search the ibtracs-events collection for a named cyclone using CQL2 like filters.

  2. Link event → hazard track points via monty:corr_id (correlation ID).

  3. Map wind-speed observations to the Saffir–Simpson scale Schott et al. (2012).

  4. Build a static Folium polyline map and an animated TimestampedGeoJson layer.

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 — Imports

======================================================================
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'

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

Connecting to STAC API: https://montandon-eoapi-stage.ifrc.org/stac

Connecting to STAC API: https://montandon-eoapi-stage.ifrc.org/stac
✅ Connected successfully!
   Catalog ID: stac-fastapi
   Catalog Title: stac-fastapi
✅ Connected successfully!
   Catalog ID: stac-fastapi
   Catalog Title: stac-fastapi

Step 2 — Helper Functions

Step 3 — Search for Hurricane Beryl

We query the ibtracs-events collection with a CQL2 like filter for the cyclone name “BERYL”, then retrieve all associated hazard track points from ibtracs-hazards using the shared monty:corr_id.

✅ Using STAC API: https://montandon-eoapi-stage.ifrc.org/stac

📚 Available Collections:
✅ Found 29 collections:
   - desinventar-events: DesInventar Mapped Events
   - desinventar-impacts: DesInventar Impacts
   - emdat-events: EM-DAT Source Events
   - emdat-hazards: EM-DAT Source Hazards
   - emdat-impacts: EM-DAT Source Impacts
   - gdacs-events: GDACS Source Events
   - gdacs-hazards: GDACS Hazards
   - gdacs-impacts: GDACS Impacts
   - gfd-events: GFD Source Events
   - gfd-hazards: GFD Source Hazards
   ... and 19 more

🔍 Searching for cyclone 'BERYL'...
✅ Found 29 collections:
   - desinventar-events: DesInventar Mapped Events
   - desinventar-impacts: DesInventar Impacts
   - emdat-events: EM-DAT Source Events
   - emdat-hazards: EM-DAT Source Hazards
   - emdat-impacts: EM-DAT Source Impacts
   - gdacs-events: GDACS Source Events
   - gdacs-hazards: GDACS Hazards
   - gdacs-impacts: GDACS Impacts
   - gfd-events: GFD Source Events
   - gfd-hazards: GFD Source Hazards
   ... and 19 more

🔍 Searching for cyclone 'BERYL'...
✅ Found 11 cyclone(s) matching 'BERYL'

✅ Found 11 cyclone(s) matching 'BERYL':
   - 2024178N09335: Tropical Cyclone BERYL (2024-06-26 00:00:00+00:00)
   - 2018186N10325: Tropical Cyclone BERYL (2018-07-04 12:00:00+00:00)
   - 2012147N30284: Tropical Cyclone BERYL (2012-05-25 12:00:00+00:00)
   - 2006200N32287: Tropical Cyclone BERYL (2006-07-18 12:00:00+00:00)
   - 2000227N23267: Tropical Cyclone BERYL (2000-08-13 18:00:00+00:00)

📌 Selected: 2024 Hurricane Beryl
   Cyclone ID: 2024178N09335
   Title: Tropical Cyclone BERYL
   Date: 2024-06-26 00:00:00+00:00
   Correlation ID: 20240626T000000-UNK-NAT-MET-STO-TRO-001-GCDB

🔍 Fetching hazard track data...
✅ Found 11 cyclone(s) matching 'BERYL'

✅ Found 11 cyclone(s) matching 'BERYL':
   - 2024178N09335: Tropical Cyclone BERYL (2024-06-26 00:00:00+00:00)
   - 2018186N10325: Tropical Cyclone BERYL (2018-07-04 12:00:00+00:00)
   - 2012147N30284: Tropical Cyclone BERYL (2012-05-25 12:00:00+00:00)
   - 2006200N32287: Tropical Cyclone BERYL (2006-07-18 12:00:00+00:00)
   - 2000227N23267: Tropical Cyclone BERYL (2000-08-13 18:00:00+00:00)

📌 Selected: 2024 Hurricane Beryl
   Cyclone ID: 2024178N09335
   Title: Tropical Cyclone BERYL
   Date: 2024-06-26 00:00:00+00:00
   Correlation ID: 20240626T000000-UNK-NAT-MET-STO-TRO-001-GCDB

🔍 Fetching hazard track data...
✅ Found 121 hazard points for correlation ID: 20240626T000000-UNK-NAT-MET-STO-TRO-001-GCDB

📊 Track Summary:
   Start: 2024-06-26 00:00:00+00:00
   End: 2024-07-11 00:00:00+00:00
   Total Points: 121
   Initial Wind Speed: 15 knots
   Final Wind Speed: 30 knots
✅ Found 121 hazard points for correlation ID: 20240626T000000-UNK-NAT-MET-STO-TRO-001-GCDB

📊 Track Summary:
   Start: 2024-06-26 00:00:00+00:00
   End: 2024-07-11 00:00:00+00:00
   Total Points: 121
   Initial Wind Speed: 15 knots
   Final Wind Speed: 30 knots

Step 4 — Static Map Visualisation

A full-track polyline coloured by wind speed, with circle markers at each observation point. The map is centred on the Caribbean / North America.

Generating Static Map...
Loading...

Step 5 — Interactive Animation

Use the ▶ Play button or the timeline slider to step through Beryl’s track over time. Each marker pulses at its observation timestamp.

Generating Interactive Map Animation...
Loading...

============================================================
Capturing Folium Animation as GIF...
============================================================
Saved map to temp_cyclone_map.html
Starting Chrome browser...
Animation started
Capturing 30 frames...
Animation started
Capturing 30 frames...
  Frame 30/30
Captured 30 frames

Captured 30 frames
Saving GIF to beryl_cyclone_folium.gif...
Saving GIF to beryl_cyclone_folium.gif...
GIF saved successfully!
Displaying generated GIF: beryl_cyclone_folium.gif
GIF saved successfully!
Displaying generated GIF: beryl_cyclone_folium.gif
<IPython.core.display.Image object>
References
  1. Schott, T., Landsea, C., Hafele, G., Lorens, J., Taylor, A., Thurm, H., Ward, B., Willis, M., & Zaleski, W. (2012). The Saffir-Simpson Hurricane Wind Scale. National Hurricane Center, NOAA. https://www.nhc.noaa.gov/aboutsshws.php
  2. Knapp, K. R., Kruk, M. C., Levinson, D. H., Diamond, H. J., & Neumann, C. J. (2024). International Best Track Archive for Climate Stewardship (IBTrACS). NOAA National Centers for Environmental Information. https://www.ncei.noaa.gov/products/international-best-track-archive