Reproduction Code: A Foundation Model Approach for Disaster Detection from Social Media, News, and Weather Data
Authors/Creators
Description
This repository contains the reproduction code and materials for the paper:
Hanny, D., Dastidar, K.G., Wieland, M., Granitzer, M. & Resch, B. (2026). Towards Multimodal Geospatial Reasoning: A Foundation Model Approach for Disaster Detection from Social Media, News, and Weather Data. [Accepted for publication in Natural Hazards]
📄 Overview
This research introduces a grid-based framework that quantifies disaster detection accuracy relative to satellite-derived reference data. We employ generative Language Models (LMs) to interpret heterogeneous information from Bluesky social media posts, GDELT news headlines, and weather observations through structured prompts and relevance-based data retrieval. The method frames detection as a binary classification problem on an H3 grid.
Our analysis pipeline includes:
- Data collection: Custom keyword-based crawling of Bluesky posts, GDELT news, and weather observations
- Data aggregation: Structured aggregation of multimodal data to H3 grid cells
- Methodology
- Statistical anomaly detection: Statistical hotspot and anomaly detection as baseline methods
- Foundation Model inference: LM-based interpretation of heterogeneous information sources
- Evaluation: Systematic comparison against satellite-derived reference
- Case studies: 2024 Central Europe floods and 2025 Southern California wildfires
📁 Repository Structure
The analysis pipeline is spread across several scripts and Jupyter/Marimo notebooks. A full overview is available below.
├── data/ # Data files
│ ├── raw/ # Raw Bluesky, GDELT, and weather data
│ │ ├── 2020_california_wildfires/
│ │ ├── 2024_central_europe_floods/
│ │ ├── 2025_socal_wildfires/
│ │ ├── auxiliary/ # Additional reference data
│ │ └── dlr/ # Satellite reference data
│ ├── processed/ # Processed datasets
│ ├── results/ # Evaluation results
│ └── mapping_data/ # Geospatial reference data
│
├── notebooks/ # Analysis workflow (run in ascending order)
│ ├── 01_bsky_data_collection.ipynb # Bluesky data collection
│ ├── 02_esda/ # Exploratory spatial data analysis
│ ├── 02_ground_truth_prep.py # Ground truth preparation
│ ├── 03_data_aggregation.py # Data aggregation to H3 grid
│ ├── 04_statistical_baseline.py # Statistical baseline methods
│ ├── 05_prompt_optimisation.py # Prompt optimization experiments
│ ├── 06_few_shot_selection.py # Few-shot example selection
│ ├── 07_in_context_learning.py # Main LLM inference pipeline
│ ├── 08_ablation_study.py # Ablation experiments
│ ├── 09_mixed_ensemble.py # Ensemble methods
│ ├── 10_visualisation.py # Result visualization
│ ├── 11_data_anonymisation.py # Data anonymization
│ └── 13_rev_*.py # Additional experiments during paper revisions
│
├── scripts/ # Non-interactive scripts
│ ├── crawling/ # Bluesky and GDELT data collection scripts
│ ├── geoparsing/ # Location extraction from text
│ ├── get_weather_data.py # Weather data retrieval
│ └── in_context_inference.py # LLM inference helper
│
├── src/ # Helper modules and reusable functions
│ ├── bsky_search.py # Bluesky crawling algorithm
│ ├── ensemble.py # Model ensemble methods
│ ├── eval_metrics.py # H3 grid-based evaluation metrics
│ ├── helpers.py # Data processing utilities
│ ├── validation.py # Validation functions
│ ├── visualisation.py # Visualization functions
│ ├── hotspot/ # Hotspot detection baselines
│ ├── in_context_learning/ # LLM prompt templates
│ ├── irchel_geoparser/ # Geoparsing tools
│ └── nlp/ # NLP processing utilities
│
├── prompts/ # LLM prompt templates
├── figures/ # Generated visualizations
├── logs/ # Log files
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── README.md
⚙️ Getting Started
To reproduce the experiments, we recommend using Docker for a consistent environment. The individual notebooks can be run using marimo as follows:
docker compose run --rm --service-ports marimo
This will start a Marimo notebook server at localhost:8080. Alternatively, you can run the notebooks directly as Python scripts, though the marimo interface is recommended.
For LM-based inference, a running Ollama instance on localhost:11434 or an OpenAI key stored as OPENAI_API_KEY environment variable are furthermore required. Please pull all desired models before running the script.
📊 Data Availability
The primary datasets supporting the conclusions of this article are available in the repository on Zenodo under the DOI 10.5281/zenodo.20038116.
📖 Citation
If you use this code or material in your research, please cite our work accordingly.
@article{Hanny.2026,
title = {Towards Multimodal Geospatial Reasoning: A Foundation Model Approach for Disaster Detection from Social Media, News, and Weather Data},
author = {Hanny, David and Dastidar, Kanishka Ghosh and Wieland, Marc and Granitzer, Michael and Resch, Bernd},
journal = {Natural Hazards},
year = {2026}
}
Files
GSAI_PUBLIC_LM_Disaster_Detection-main.zip
Files
(3.7 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:1120fed225cb9d624369e37627c11a59
|
3.7 MB | Preview Download |
Additional details
Related works
- Requires
- Dataset: 10.5281/zenodo.20038116 (DOI)