I would like to know if there is a way to either download/scrape a clean CSV with coordinates and controlling group from Wikipedia conflict maps, or how to generate an ESRI shapefile from the Lua script. I have no experience using Lua.
Wikipedia has several maps for civil conflicts, which all seem to share the same structure and naming, e.g. Module:Sinai insurgency detailed map, which I've chosen due to its simplicity.
# R script for scraping text # library library(rvest) #SINAI url <- "https://en.wikipedia.org/wiki/Template:Sinai_insurgency_detailed_map" coords <- url %>% read_html() %>% html_nodes(xpath='//*[@id="mw-content-text"]/div') %>% html_text()
I am currently using the above script to write a raw .txt file. I then clean it with OpenRefine to create a usable CSV in QGIS. I realize this is not the most efficient workflow.