Reputation: 21
I'm trying to extract all ongoing conflicts from the table shown at
https://en.wikipedia.org/wiki/List_of_ongoing_armed_conflicts
but I can't get my head around how to even address the content of the list.
Basically, I want to return the same list. I think the biggest problem for me is how to get conflicts that are ongoing.
Can anyone help me out?
Upvotes: 2
Views: 571
Reputation: 16394
(The following is the pure-Wikidata approach. If you meant the actual table, and you just want it once, I’d copy & paste into an editor or spreadsheet and fix with search & replace if necessary)
For wikidata, this is what I came up with:
SELECT DISTINCT ?conflict ?conflictLabel ?start ?pointInTime WHERE {
{
?conflict wdt:P31/wdt:P279* wd:Q350604.
}
MINUS {
?conflict wdt:P582 ?someEnd.
}
MINUS {
?conflict wdt:P585|wdt:P580 ?longAgo.
FILTER((YEAR(?longAgo)) < 1945 )
}
OPTIONAL { ?conflict wdt:P580 ?start. }
OPTIONAL { ?conflict wdt:P585 ?pointInTime. }
?conflict wikibase:sitelinks ?sitelinks.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?sitelinks)
The data really isn't very good, I fear. The Mexican Drug War, first in the table you linked, and many other conflicts, don't list start and/or end times.
So the logic, above, is: All armed conflicts or subclasses of such that do not have an end date, and do not have a start and/or "point in time" that's before 1945, assuming no conflict has been going on that long. To get some sense of relevance, I'm using the sitselinks (number of language wikipedias with an article) to sort.
If you're lucky, there are lots of false positives in there, but relatively few false negatives that are missing.
Upvotes: 1