Chapter 7 Contextualize
7.1 Getting external data
Incidents of violent events rarely occur alone. They are part of a society, a political climate or an armed conflict. Comparing incidents with other data can help testing hypothesis - that may potentially save lives. A few examples:
- A party to an armed conflict uses heavy weaponry in densely populated areas. Looking at these incidents together with population density may reveal a pattern or help prove an intention.
- Violence against a minority may occur in places where a particular party gains high votes.
- Outbreaks of violence may have something to do with road accessibility in harsh weather conditions of a specific season.
Do not confuse correlation and causation.
The purpose of this chapter is to give the right pieces of information to people who need to decide about actions (humanitarian interventions, counselling activities for victims of racist violence). These decision-makers base their decisions on evidence - and a wide vision of the context is usually helpful.
7.2 Examples fo external data
- Geospatial data
- GiscoR population density grids
- Facebook social connectedness.
- ACLED Data: since early 2021, the Armed Conflict Location & Event Data Project has expanded coverage to Europe.
7.3 Mapping Populalation Density (Europe)
For Europe, population density data can be obtained from EU’s GISCO. This script downloads a zip file, unzips it and places the contents in a data directory below your current RProj directory.
# adjust resolution to 1 if you have bandwidth and disk space <- giscoR::gisco_get_grid(resolution = 5) pop_grid # filtering for admin region of interest, DE2 here. <- pop_grid %>% pop_grid_filtered filter(NUTS2016_0 == "DE") %>% filter(NUTS2016_1 == "DE2")
With the grid loaded, we can proceed and plot population density below our geocoded incidents:
ggplot() + geom_sf(data = admin_boundaries) + # population density is mapped to transparency here, # otherwise you cannot have two different fill color scales geom_sf(data = pop_grid_filtered, aes(alpha = TOT_P_2011), fill = "black", lwd=0) + stat_bin_hex(data = chronicle, aes(x = lon, y = lat, fill = ..count..), alpha = 0.8, binwidth = 0.1) + scale_fill_viridis(option = "C", direction = -1) + labs(alpha = "Population Density", fill = "Incidents in Chronicle")
In this example below we have introduced a cap of 5000 on population density. Solid black therefore represents 5000 and above - otherwise sparsely populated places would not appear. This chart would help to check if your incidents are an urban phenomenon
If you’re reproducing this map for incidents outside of Europe, check the datasets from Worldpop
7.5 Armed Conflict Data
ACLED data is well coded, freely available (though you need token) and has a solid methodology. Since January 2021 ACLED also covers the whole of Europe, monitoring armed conflict, social movements, political violence.
<- jsonlite::read_json("https://api.acleddata.com/acled/read?key=Your-API-Key&email=Your-Registration-Email&country=Germany", simplifyVector = TRUE) acled_events <- acled_events$data acled_events <- acled_events %>% acled_regional filter(admin1 == "Bayern (Bodensee)") %>% # ensure R takes date as date mutate(event_date = lubridate::ymd(event_date)) %>% #make sure numbers are numbers mutate(latitude = as.numeric(latitude)) %>% mutate(longitude = as.numeric(longitude)) %>% mutate(fatalities = as.numeric(fatalities)) %>% mutate(week = as.Date(cut(event_date, breaks = "week"))) %>% chronicle group_by(placestring, lat, lon) %>% summarise(n = n()) %>% ggplot() + geom_sf(data = admin_boundaries, fill = "White") + stat_bin_hex(data = acled_regional, aes(x = longitude, y = latitude, fill = ..count..), alpha = 0.9, binwidth = 0.2) + geom_point(aes(x = lon, y = lat, size = n)) + scale_fill_viridis(option = "C", direction = -1, end = 0.8) + theme_void() + theme(legend.text = element_text(size = 8), legend.key.size = unit(1.5, "lines"), legend.position = "bottom", legend.box = "horizontal") + labs(title = "Incidents as per ACLED vs Incidents as per internal chronicle", fill = "Incidents as per ACLED", size = "Incidents as per chronicle", caption = "ACLED incidents summarised ")