Back to Blog
July 15, 20263 min read1 view

Building an AI-Friendly Disaster Monitor for the Philippines

How I built a dependency-free Python tool designed for AI agents and automation pipelines to monitor disasters in the Davao Gulf area.

#python#automation#disaster-monitoring#philippines#cron#stdout#ai-agents

The goal of this repo is not a dashboard for humans. It is a module built for agents and automation pipelines to watch for disasters in your area.

Why Agents Need This

I operate a network of systems portfolio, automation, notifications that all benefit from timely disaster awareness. But I did not want to yet again hardcode another API client, depend on a dashboard, or babysit an integration.

[ph-disaster-monitor](https://github.com/whilmarbitoco/ph-disaster-monitor) exists so an agent or cron job can:

  1. Run the module on a schedule
  2. Get clean alerts when something new happens
  3. Stay silent when nothing changed
  4. Consume structured output for downstream decisions

That is it. No UI, no login, no webhook portal. Just a reliable stdout/JSON feed an agent can ingest.

What the Tool Actually Does

  • Polls multiple authoritative APIs — USGS for earthquakes, GDACS for cyclones/floods/volcanoes/droughts, ReliefWeb for NDRRMC/PAGASA reports
  • Deduplicates intelligently — USGS is authoritative for earthquakes, so cross-source repeats are suppressed rather than fired again
  • Filters by region — presets for Philippines-wide, Luzon, Visayas, Mindanao, Davao
  • Dual output — human-readable text for messaging channels, JSON for agents and scripts
  • Cron-ready — tracks prior state, so a scheduled run only produces output when there is something new
  • Zero dependencies — Python 3.11+ stdlib only. No virtualenv, no pip install, no lockfile

How an Agent Uses It

A typical flow:

python -m ph_disaster_monitor --region davao --json

If the output is empty, the agent knows nothing new happened and moves on. If there is output, the agent parses the structured event list and decides what to do: notify, reroute, delay, or log.

This fits cleanly into agentic automation because the module:

  • has no side effects
  • exits 0 whether or not events are found
  • writes state so the next run is deterministic
  • speaks both text and JSON

Design Choices

  • Boringly reliable over clever. No third-party libraries, no scheduled task framework embedded in the module, no retry loops beyond what stdlib gives you.
  • Authoritative sources first. USGS owns earthquakes. GDACS owns cyclones and floods. ReliefWeb owns official reports. The module respects that hierarchy instead of blending everything into one noisy stream.
  • Region-aware by default. One flag moves the scope from nationwide to a specific island or region.

What It Does Not Do

This is intentionally narrow. It does not predict hazards. It does not route alerts. It does not build supply-chain graphs or operator timelines.

Those are separate layers. This module sits at the bottom: ingestion, deduplication, formatting.

Use It

git clone https://github.com/whilmarbitoco/ph-disaster-monitor.git
python -m ph_disaster_monitor --region davao

MIT licensed, CI-tested through GitHub Actions, and designed for long-running reliability.

Whilmar Bitoco

Whilmar Bitoco

Full-Stack Developer & Aspiring Cloud Engineer

All Posts
_post.building-an-ai-friendly-disaster-monitor-for-the-philippines|v.y6undaaw