Ucdp

v0.2.1
io.github.pipeworx-io/ucdp Checked 1 day ago Published 26 days ago

Armed-conflict deaths, active wars and violence events from the Uppsala Conflict Data Program…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ucdp_fatalities_summary

Deaths from armed conflict and organized violence in a country for a year or range of years, from the Uppsala Conflict Data Program (UCDP) country-year dataset: best, low and high fatality estimates split into state-based conflict, non-state conflict and one-sided violence against civilians, plus combatant vs civilian victims and the named warring dyads. Answers "how many people were killed in the Sudan war in 2024", conflict death tolls, casualty trends since 1989. Country names resolve to Gleditsch-Ward codes. Example: ucdp_fatalities_summary({ country: "Sudan", year: 2024 })

ParameterTypeDescription
country *stringCountry name ("Sudan", "DR Congo", "Myanmar") or Gleditsch-Ward code ("625")
fromintegerStart year of a range (with `to`) — returns one row per year
tointegerEnd year of a range (with `from`)
yearintegerCalendar year, 1989 to the latest released year. Omit for the latest year.

ucdp_conflicts

Armed conflicts recorded by UCDP/PRIO for a country or year: the government and rebel/state parties, whether the fight is over territory or government, intrastate / interstate / internationalized type, intensity (minor vs war), episode start and end dates, and battle-related deaths (best/low/high) for that year. Answers "which armed conflicts were active in Ethiopia in 2023", "how many battle deaths did the Russia-Ukraine war cause in 2024", "list wars with over 1,000 deaths". Example: ucdp_conflicts({ country: "Ethiopia", year: 2023 })

ParameterTypeDescription
countrystringCountry name or Gleditsch-Ward code of the conflict location. Omit for all countries.
intensitystringFilter by intensity: minor (25-999 battle deaths) or war (1,000+)
limitintegerMax conflicts to return (default 50, max 500), sorted by battle deaths
yearintegerConflict-year, 1946 onward (battle deaths from 1989). Omit for the latest year.

ucdp_countries

The countries the Uppsala Conflict Data Program codes, with their Gleditsch-Ward country codes, region, years covered and the latest year's total deaths from organized violence. Use it to resolve a country name or code before calling other ucdp tools, or to rank countries by conflict deaths. Example: ucdp_countries({ query: "congo" })

ParameterTypeDescription
min_deathsintegerOnly countries with at least this many organized-violence deaths (best estimate) in the latest year
querystringSubstring of the country name; omit for the full list
regionstringFilter by UCDP region: Africa, Americas, Asia, Europe, Middle East

ucdp_recent_events

Individual violence events from the newest monthly UCDP GED Candidate release — the preliminary current-year event list, published monthly: date, place with coordinates, warring sides, type (state-based, non-state, one-sided), fatality best/low/high and the source headline. Answers "what attacks happened in Nigeria last month", "recent conflict events in Myanmar with fatalities". For yearly totals use ucdp_fatalities_summary; for events in earlier years use ucdp_events. Example: ucdp_recent_events({ country: "Nigeria", limit: 20 })

ParameterTypeDescription
countrystringCountry name or Gleditsch-Ward code; omit for all countries
limitintegerMax events (default 50, max 500), newest first
min_deathsintegerOnly events with at least this many deaths (best estimate)
type_of_violencestringstate-based | non-state | one-sided (or 1 | 2 | 3)

ucdp_events

Georeferenced armed-conflict events from the UCDP Georeferenced Event Dataset (GED) for a country and date range, 1989 to the latest yearly release: each event with date, location and coordinates, sides, violence type and best/low/high deaths. Answers "list the deadliest events in Sudan in 2024" or "battles in Donetsk in March 2023". Requires a UCDP API access token passed as _apiKey. Example: ucdp_events({ country: "Sudan", start: "2024-01-01", end: "2024-12-31", limit: 100, _apiKey: "your-token" })

ParameterTypeDescription
_apiKey *stringUCDP API access token (x-ucdp-access-token). Request one free from the API maintainer at https://ucdp.uu.se/apidocs
country *stringCountry name or Gleditsch-Ward code
endstringLatest event end date, YYYY-MM-DD
limitintegerEvents per page (default 100, max 1000)
pageintegerPage number, 1-based
startstringEarliest event end date, YYYY-MM-DD
type_of_violencestringstate-based | non-state | one-sided (or 1 | 2 | 3)
versionstringGED release, default "26.1"; candidate releases like "26.0.7" work too