This page visualizes the voting behavior of Argentina and all other UN member countries in the UN General Assembly in 2022. 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 Argentina. Countries with darker shading have a similar voting record to Argentina; countries with brigher colors vote against Argentina 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 Argentina

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

# Load data, downloaded from https://dataverse.harvard.edu/dataset.xhtml?persistentId=hdl:1902.1/12379
dd <- rio::import("IdealpointestimatesAll_Jul2023.csv")
dd22 <- filter(dd, session == 77)
dd22$ArgDiff <- abs(dd22$IdealPoint - dd22[dd22$Countryname == "Argentina", ]$IdealPoint)

# dd22$country_name <- countrycode::countrycode(sourcevar = dd22$ccode,
#                                                origin = "cown",
#                                                destination = "country.name")
# dd22[dd22$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(dd22$ArgDiff, probs = c(0, 0.2, 0.4, 0.6, 0.8, 1))
dd22$ArgDiff_quantiles <- cut(dd22$ArgDiff, breaks = c(0.0000001, tbs), include.lowest = TRUE)

Arg_map <- left_join(x = worldmap,
                      y = dd22,
                      by = c("ccode" = "ccode"))

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

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


Arg_map$Country <- Arg_map$region

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

p2 <- ggplot(data = filter(Arg_map, region != "Antarctica"),
       aes(x = long, y = lat, group = group, label = Country)) + 
  geom_polygon(aes(fill = ArgDiff_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)(5)[1:4], "green", viridis_pal(option = "C", direction = 1)(5)[5])), na.value = "gray") + 
  # scale_fill_manual(values = (c(viridis_pal(option = "C", direction = 1)(6)[1:6])), na.value = "gray") + 
  scale_fill_manual(values = (c("green", viridis_pal(option = "C", direction = 1)(6)[1:6])), na.value = "gray") + 
  guides(fill = "none") + 
  theme_map() + 
  labs(title = "UNGA voting proximity to Argentina (darker = more similar)",
       subtitle = "Data for 2022 (UNGA 77).\nBrighter shading indicates higher distance from Argentina'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 Argentina’s in the 2022 (77th) session. Countries with the lowest values (to the left) voted with Argentina the most; countries with the highest value voted with Argentina the least often.

dd22$Continent <- countrycode::countrycode(sourcevar = dd22$ccode, origin = "cown", destination = "continent")
dd22$pctagreeArg <- abs(dd22$ArgDiff)
dd22$pctagreeArg <- ifelse(dd22$Countryname == "Argentina", 0,  dd22$pctagreeArg)

p3 <- ggplot(data = arrange(filter(dd22, !is.na(Countryname) & !is.na(pctagreeArg) & !is.na(Continent)), pctagreeArg), 
             aes(x = pctagreeArg, y = reorder(Countryname, -pctagreeArg), color = Continent)) + 
            geom_point() + 
            geom_text(aes(x = ifelse(pctagreeArg > 1, pctagreeArg - 0.05, pctagreeArg + 0.05), hjust = ifelse(pctagreeArg > 1, 1, 0), label = Countryname), size = 2) + 
  scale_y_discrete(breaks = 0) + 
  # scale_color_viridis_d() + 
  ylab("") + 
  xlab("UNGA voting distance from Argentina, 2022") + 
  labs(color = "", title = "UNGA voting distance from Argentina",
       subtitle = "All countries, 2022.\nHigher values mean fewer votes in agreement with Argentina",
       caption = "Source: Bailey et al. (2017)") + 
  theme_minimal() + theme(legend.position = c(0.75, 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.