For this graph I counted how many times a country are mentioned in the Wikipedia-article of an other European country’s history.
To do this I did following:
First I saved all the articles about the history of European countries in separate text-files. I then created a list with the words I want to search for. This was necessary to include the adjectives of the countries like dutch, but also different common names like Britain for the UK.
I imported the lists into R and searched the articles with help of the search-list. To visualize the whole thing I then used ggplot and geom_raster. I tried to use Plotly to put an interactive version online. But somehow it was bugged and I couldn’t figure out what caused it.
Because I already had a nice matrix of the relations of the countries, I tried if can make a network graph. I took the matrix with the mentions per 1000 words and filtered out everything under 0.5 connections. I just did a simple graphic and didn’t clean it up or make it useful. But here it is anyway. I probably try to more stuff with networks in the future.