Monitor changes
monitor_changesCompare a country's UNHCR displacement figures across years and snapshots to flag jumps, threshold crossings, records, new releases, and revisions.
Instructions
Check a country's UNHCR displacement figures for changes worth attention: compares the latest year with the previous one (significant jumps, threshold crossings, record highs/lows) and, against an earlier snapshot, detects new data releases and revisions of past years. Returns alert-ready events with stable ids and severities plus a snapshot to compare against next time. Read-only: never contacts anyone; the snapshot is kept in the server cache and/or returned to the caller.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | "asylum" = people hosted IN the country; "origin" = people displaced FROM the country | |
| locale | No | Language of the human-readable text output: "en" (default) or "ar" (Modern Standard Arabic, right-to-left). Structured JSON fields, ISO3 codes and dataset ids stay in English either way. | |
| country | Yes | Country name or ISO3 code, e.g. "Egypt", "EGY", "syria" | |
| metrics | No | Metrics to watch (default: refugees, asylum_seekers, idps, returned_refugees, returned_idps, stateless, ooc, oip — those with data) | |
| snapshot | No | A `snapshot` returned by an earlier call — compare against it (takes precedence over the server-stored one) | |
| min_change | No | Ignore changes smaller than this many people (default 1000) | |
| thresholds | No | Alert when a metric crosses a level between the previous and latest year | |
| history_years | No | Years of history to load for records and unusual-change scoring (default 10) | |
| store_snapshot | No | Save this result as the stored baseline for the next call (default true) | |
| jump_threshold_pct | No | Year-over-year change (%) flagged as a significant jump (default 25) | |
| use_stored_snapshot | No | Compare against the snapshot stored by the previous call (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| events | Yes | ||
| source | Yes | ||
| country | Yes | ||
| dataset | Yes | ||
| metrics | Yes | ||
| summary | Yes | ||
| baseline | Yes | ||
| citation | Yes | ||
| snapshot | Yes | ||
| latest_year | Yes | ||
| country_code | Yes | ||
| previous_year | Yes | ||
| snapshot_stored | Yes |