This page visualizes the voting behavior of Turkmenistan and all other UN member countries in the UN General Assembly since 2005. Scholars have used these data to track how close or apart countries are in international relations; for examples, see here https://goo.gl/fZPBUO and here https://goo.gl/vlzVFf.

This map below is shaded based on how similar or different countries’ voting record was to that of Turkmenistan. Countries with darker shading have a similar voting record to Turkmenistan; countries with brigher colors vote against Turkmenistan more often. You can zoom and pan the map. Hover of a country for more information. Lower values on the “Difference” score mean that a country has a more similar voting record to Turkmenistan.

library("tidyverse")
library("plotly")

# Load data, downloaded from https://dataverse.harvard.edu/dataset.xhtml?persistentId=hdl:1902.1/12379
dd <- rio::import("/Users/johanneskarreth/Documents/Dropbox/Uni/Teaching/POL 350 (Model UN)/Spring 2021/Handouts/dataverse_files/IdealpointestimatesAll_Apr2020.csv")
dd19 <- filter(dd, session == 74)
dd19$Turkmenistandiff <- dd19$IdealPoint - dd19[dd19$Countryname == "Turkmenistan", ]$IdealPoint

# dd19$country_name <- countrycode::countrycode(sourcevar = dd19$ccode,
#                                                origin = "cown",
#                                                destination = "country.name")
# dd19[dd19$ccode == 816, ]$country_name <- "Vietnam"

library("ggthemes")
library("maps")

worldmap <- map_data("world")

worldmap$ccode <- as.numeric(countrycode::countrycode(sourcevar = worldmap$region, origin = "country.name", destination = "cown"))
worldmap[worldmap$region == "Vietnam", ]$ccode <- 816
tbs <- quantile(dd19$Turkmenistandiff, probs = c(0, 0.2, 0.4, 0.6, 0.8, 1))
dd19$Turkmenistandiff_quantiles <- cut(dd19$Turkmenistandiff, breaks = c(tbs[1], -0.0001, 0.0001, tbs[2:6]), include.lowest = TRUE)

Turkmenistan_map <- left_join(x = worldmap,
                      y = dd19,
                      by = c("ccode" = "ccode"))

# dd19$countrycode_iso3c <- countrycode::countrycode(dd19$country_name,
#                                                           origin = "country.name",
#                                                           destination = "iso3c")

# manually add the code for Vietnam (VNM)
# dd19[dd19$ccode == 816, ]$countrycode_iso3c <- "VNM"
dd19 <- filter(dd19, !is.na(iso3c))


Turkmenistan_map$Country <- Turkmenistan_map$region

library("ggthemes")
library("viridis")

p2 <- ggplot(data = filter(Turkmenistan_map, region != "Antarctica"),
       aes(x = long, y = lat, group = group, label = Country)) + 
  geom_polygon(aes(fill = Turkmenistandiff_quantiles)) + 
  coord_map("rectangular", lat0 = 0, ylim = c(-60, 80), xlim=c(-180,180)) + 
  scale_x_continuous(breaks = FALSE) + 
  scale_y_continuous(breaks = FALSE) +
  scale_fill_manual(values = (c("black", "green", viridis_pal(option = "C", direction = 1)(6)[1:6])), na.value = "gray") + 
  guides(fill = FALSE) + 
  theme_map() + 
  labs(title = "UNGA voting proximity to Turkmenistan",
       subtitle = "Data for 2019.\nBrighter shading indicates higher distance from Turkmenistan's voting record.",
       caption = "Source: Bailey et al. (2017)") + 
  theme(legend.position = "none")

ggplotly(p2, tooltip = c("label", "fill"))

The second figure shows each country’s voting record’s similarity to Turkmenistan’s in the 2019 (74th) session. Countries with the lowest values (to the left) voted with Turkmenistan the most; countries with the highest value voted with Turkmenistan the least.

dd19$Continent <- countrycode::countrycode(sourcevar = dd19$ccode, origin = "cown", destination = "continent")
dd19$pctagreeTurkmenistan <- dd19$Turkmenistandiff + abs(min(dd19$Turkmenistandiff))

p3 <- ggplot(data = arrange(filter(dd19, !is.na(Countryname) & !is.na(pctagreeTurkmenistan) & !is.na(Continent)), pctagreeTurkmenistan), 
             aes(x = pctagreeTurkmenistan, y = reorder(Countryname, -pctagreeTurkmenistan), color = Continent)) + 
            geom_point() + 
            geom_text(aes(x = ifelse(pctagreeTurkmenistan > 2, pctagreeTurkmenistan - 0.05, pctagreeTurkmenistan + 0.05), hjust = ifelse(pctagreeTurkmenistan > 2, 1, 0), label = Countryname), size = 2) + 
  scale_y_discrete(breaks = 0) + 
  # scale_color_viridis_d() + 
  ylab("") + 
  xlab("Share of UNGA votes in agreement with Turkmenistan, 2019") + 
  labs(color = "", title = "UNGA votes voting dissimilarity with Turkmenistan",
       subtitle = "All countries, 2019.\nHigher values mean fewer votes in agreement with Turkmenistan.",
       caption = "Source: Bailey et al. (2017)") + 
  theme_minimal() + theme(legend.position = c(0.1, 0.9))

# Print
p3

Source

The data used in this visualization are taken from:

The figures were made in R, using the plotly package for interactive figures.