diff --git a/Castoro/Castoro-Italic.ttf b/Castoro/Castoro-Italic.ttf new file mode 100644 index 00000000..a162b631 Binary files /dev/null and b/Castoro/Castoro-Italic.ttf differ diff --git a/Castoro/Castoro-Regular.ttf b/Castoro/Castoro-Regular.ttf new file mode 100644 index 00000000..f5c59196 Binary files /dev/null and b/Castoro/Castoro-Regular.ttf differ diff --git a/Castoro/OFL.txt b/Castoro/OFL.txt new file mode 100644 index 00000000..7da68a71 --- /dev/null +++ b/Castoro/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Castoro Project Authors (https://github.com/TiroTypeworks/Castoro) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/_projects/2025/100566135/100566135.Rmd b/_projects/2025/100566135/100566135.Rmd new file mode 100644 index 00000000..7a6081f5 --- /dev/null +++ b/_projects/2025/100566135/100566135.Rmd @@ -0,0 +1,761 @@ +--- +title: "Combatant deaths in conventional wars, 1800-2011" +description: "Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can make the death tolls much larger." +categories: "2025" +author: "Adela Solís" +date: "`r Sys.Date()`" +output: + distill::distill_article: + self_contained: false +toc: true +--- + + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + out.width = "100%", + fig.align = "center", + fig.showtext = TRUE +) +``` + +# Graph Replication + +## Loading Libraries and Data + +```{r libraries and load data, message=FALSE} +library(tidyverse) +library(scales) +library(patchwork) +library(showtext) + +data <- read.csv("wars_by_deaths_mars.csv") +``` + +## Data Preparation + +```{r data preparation} +set.seed(123) +data <- data |> + mutate( # calculating average deaths for sizing + avg_deaths = (war_deaths_low + war_deaths_high) / 2, + deaths_millions = avg_deaths / 1000000, + war_type = ifelse(civil_war == "Civil war", "CIVIL WARS", "INTERSTATE WARS"), + war_type = factor(war_type, levels = c("INTERSTATE WARS", "CIVIL WARS")), + + y_manual = case_when( # here i manually assign a 'y_manual' value to each war to ensure exact spread, each war gets a specific y-coordinate (0-10 scale) + + # INTERSTATE WARS (positioned around y = 4.0) + war_name == "Second Maratha War" ~ 4.17, + war_name == "Napoleonic Wars" ~ 4.7, + war_name == "Anglo-Turkish War" ~ 3.95, + war_name == "Russo-Turkish War" ~ 3.67, + war_name == "Russo-Persian War" ~ 4.17, + + war_name == "War of 1812" ~ 4.0, + war_name == "Wahhabi War" ~ 4.3, + war_name == "Neapolitan War" ~ 3.87, + war_name == "Gurkha War" ~ 4.1, + war_name == "Bombardment of Algiers" ~ 4.0, + war_name == "Third Maratha War" ~ 4.15, + war_name == "Durrani Empire-Sikh War" ~ 3.7, + war_name == "Fifth Cape Frontier War" ~ 4.0, + + war_name == "Turko Persian War" ~ 4.0, + war_name == "Ashanti-British War" ~ 4.15, + war_name == "First Anglo-Burmese War" ~ 3.78, + war_name == "Siege of Bharatpur" ~ 4.0, + war_name == "Argentine-Brazilian War" ~ 4.15, + war_name == "Vientiane-Siam War" ~ 3.6, + war_name == "Second Russo-Persian War" ~ 3.9, + war_name == "Russo-Turkish War of 1828-29" ~ 4.3, + war_name == "Gran Colombia-Peru War" ~ 4.05, + war_name == "French-Algerian War" ~ 4.0, + + war_name == "Siamese-Vietnamese War" ~ 4.0, + war_name == "Afghan-Sikh War" ~ 4.0, + war_name == "Afghan-Persian War" ~ 3.78, + war_name == "War of the Confederation" ~ 4.17, + war_name == "First Opium War" ~ 4.23, + war_name == "Bolivia-Peru War" ~ 4.0, + war_name == "Sino-Sikh War" ~ 3.78, + war_name == "Siamese-Vietnamese War II" ~ 4.35, + war_name == "Gwalior War" ~ 4.1, + war_name == "Anglo-Baluch War" ~ 3.8, + war_name == "Franco-Moroccan War" ~ 4.0, + + war_name == "Mexican-American War" ~ 3.78, + war_name == "Second Dominican War" ~ 4.23, + war_name == "Seventh Cape Frontier War" ~ 4.0, + war_name == "First Anglo-Sikh War" ~ 3.53, + war_name == "Austro-Sardinian War of 1848" ~ 4.33, + war_name == "First Schleswig-Holstein War" ~ 4.0, + war_name == "First Egba-Dahomey War" ~ 3.8, + war_name == "Eighth Cape Frontier War" ~ 4.0, + war_name == "La Plata War" ~ 4.23, + war_name == "Tukolor-Tamba War" ~ 4.1, + war_name == "Crimean War" ~ 4.6, + war_name == "Tukolor-Bambara War of 1855" ~ 4.2, + war_name == "Tibet-Nepalese War" ~ 3.75, + war_name == "Fourth Dominican War" ~ 3.95, + war_name == "Central American National War" ~ 4.25, + war_name == "Anglo-Persian War" ~ 4.03, + war_name == "Franco-Tukulor War" ~ 4.23, + war_name == "Second Opium War" ~ 4.03, + war_name == "Hispano-Moroccan War" ~ 3.78, + war_name == "Two Sicilies Insurrection" ~ 4.2, + war_name == "Papal States War" ~ 4.0, + war_name == "Tukulor-Bambara War of 1860" ~ 4.43, + + war_name == "Central American War" ~ 4.2, + war_name == "Ecuadorian-Colombian War" ~ 4.0, + war_name == "Second Schleswig-Holstein War" ~ 3.67, + war_name == "Second Egba-Dahomey War" ~ 4.04, + war_name == "Franco-Mexican War" ~ 3.4, + war_name == "Russia-Khokandian War" ~ 3.87, + war_name == "Sino-Kuchean Muslim War" ~ 4.23, + war_name == "Sino-Khokandian War" ~ 4.06, + war_name == "Russia-Bukhara Khanate War" ~ 3.77, + war_name == "Austro-Prussian War" ~ 3.5, + war_name == "Paraguayan War" ~ 4.2, + war_name == "British Abyssinian Expedition" ~ 3.8, + war_name == "Franco-Prussian War" ~ 4.5, + war_name == "Sino-Jahriyya Order War" ~ 3.55, + war_name == "Ottoman Conquest of Arabia" ~ 3.8, + war_name == "Kashgaria-Urumchi Dungan War" ~ 4.05, + + war_name == "Anglo-Ashanti War" ~ 4.17, + war_name == "Egypt-Abyssinian War" ~ 3.55, + war_name == "Russia-Khokand Khanate War" ~ 4.2, + war_name == "First Central American War" ~ 4.0, + war_name == "Sino-Kashgarian War" ~ 3.8, + war_name == "Russo-Turkish War of 1877-78" ~ 4.3, + war_name == "Ninth Cape Frontier War" ~ 4.0, + war_name == "British-Zulu War" ~ 3.77, + war_name == "Second Anglo-Afghan War" ~ 4.23, + war_name == "Russo-Turkomen War" ~ 4.0, + + war_name == "War of the Pacific" ~ 3.77, + war_name == "Anglo-Egyptian War" ~ 4.0, + war_name == "Sino-French (Tonkin) War" ~ 4.15, + war_name == "Second Central American War" ~ 4.0, + war_name == "Serbo-Bulgarian War" ~ 4.2, + war_name == "Ethiopian-Mahdi War" ~ 3.73, + war_name == "War of Dogali" ~ 4.0, + war_name == "Mahdi-Egyptian War" ~ 4.0, + + war_name == "Franco-Dahomean War" ~ 4.1, + war_name == "Franco-Mandingo War V" ~ 4.0, + war_name == "Congo Arab War" ~ 4.37, + war_name == "Bornu Empire-Rabah Empire War" ~ 3.75, + war_name == "France-Tukolor Empire War" ~ 4.05, + war_name == "Melilla War" ~ 4.2, + war_name == "Mahdist-Italian War" ~ 3.9, + war_name == "First Matabele War" ~ 4.1, + war_name == "First Sino-Japanese War" ~ 3.9, + war_name == "Japanese Invasion of Taiwan" ~ 4.3, + war_name == "Portugal-Gaza Nguni War" ~ 4.1, + war_name == "Second Franco-Hova War" ~ 4.01, + war_name == "First Italo-Abyssinian War" ~ 3.73, + war_name == "British-Mahdi War" ~ 3.85, + war_name == "Spanish-American War" ~ 4.15, + war_name == "Franco-Mandingo War VIII" ~ 4.07, + war_name == "Second Anglo-Boer War" ~ 4.2, + war_name == "War of the Golden Stool" ~ 4.27, + war_name == "British-Sokoto Caliphate War" ~ 3.8, + war_name == "Franco-Rabah Empire War" ~ 4.0, + + war_name == "Boxer Rebellion" ~ 4.05, + war_name == "Russo-Japanese War" ~ 4.3, + war_name == "Third and Fourth Central American War" ~ 4.05, + war_name == "Second Spanish-Moroccan War" ~ 4.15, + war_name == "Greco-Turkish War" ~ 3.8, + war_name == "Wadai War" ~ 4.0, + war_name == "Italo-Turkish War" ~ 4.15, + war_name == "Second Balkan War" ~ 3.7, + war_name == "First Sino-Tibet War" ~ 4.0, + + war_name == "World War I" ~ 1.65, + war_name == "Second Sino-Tibet War" ~ 4.0, + war_name == "Polish-Ukrainian War" ~ 4.5, + war_name == "Czech-Polish War" ~ 4.3, + war_name == "Hungarian Adversaries War" ~ 3.75, + war_name == "Third Anglo-Afghan War" ~ 4.1, + war_name == "Soviet-Polish War" ~ 3.5, + war_name == "Waziristan Campaign" ~ 4.0, + war_name == "Franco-Turkish War" ~ 4.2, + war_name == "Turkish-Armenian War" ~ 3.8, + war_name == "Azeri-Armenian War" ~ 4.1, + war_name == "Polish-Lithuanian War" ~ 4.0, + war_name == "Soviet-Georgia War" ~ 3.7, + war_name == "Hejaz War" ~ 4.0, + + war_name == "Second Sino-Japanese War" ~ 4.4, + war_name == "Third Sino-Japanese War" ~ 2.85, + war_name == "World War II" ~ 7.9, + war_name == "Sino-Soviet War" ~ 4.0, + war_name == "Chaco War" ~ 3.7, + war_name == "East Turkestan Kashgar War" ~ 4.25, + war_name == "Saudi-Yemeni War" ~ 4.01, + war_name == "Second Italo-Abyssinian War" ~ 3.9, + war_name == "Battle of Lake Khasan" ~ 4.01, + war_name == "Battle of Khalkhin Gol" ~ 4.2, + war_name == "Peruvian-Ecuadorian War" ~ 4.0, + war_name == "East Turkestan Gulja Incident" ~ 4.0, + war_name == "India-Pakistan War of 1947" ~ 4.0, + war_name == "Operation Polo" ~ 4.2, + war_name == "1948 Palestine War" ~ 3.8, + war_name == "Korean War" ~ 4.6, + war_name == "Suez Crisis" ~ 3.95, + war_name == "Second Taiwan Strait Crisis" ~ 4.09, + + war_name == "Sino-Indian War" ~ 3.95, + war_name == "India-Pakistan War of 1965" ~ 3.95, + war_name == "Six Day War" ~ 3.95, + war_name == "Vietnam War" ~ 3.22, + war_name == "Football War" ~ 3.95, + war_name == "War of Attrition" ~ 4.09, + war_name == "Yom Kippur War" ~ 4.0, + war_name == "North Vietnam-South Vietnam War" ~ 4.25, + war_name == "Vietnamese-Cambodian War" ~ 4.0, + war_name == "Uganda-Tanzania War" ~ 4.09, + war_name == "First Sino-Vietnamese War" ~ 3.8, + war_name == "Yemen Border War II" ~ 4.0, + war_name == "Falklands War" ~ 4.0, + war_name == "Lebanese War of 1982-84" ~ 4.09, + war_name == "Iran-Iraq War" ~ 3.6, + war_name == "Toyota War" ~ 4.1, + war_name == "Second Sino-Vietnamese War" ~ 4.0, + war_name == "Iraq-Kuwait War" ~ 4.0, + war_name == "Persian Gulf War" ~ 4.25, + war_name == "Nagorno-Karabakh War" ~ 4.0, + war_name == "US-Afghan" ~ 4.25, + war_name == "Ethiopian-Eritrean War" ~ 3.7, + war_name == "Kargil Conflict" ~ 4.0, + war_name == "US-Iraq War" ~ 4.0, + war_name == "Israel-Hezbollah War" ~ 4.0, + + # CIVIL WARS (positioned around y = 5.0) + war_name == "Argentine War of Independence" ~ 5.0, + war_name == "Venezuelan War of Independence" ~ 5.3, + war_name == "Chilean War of Independence" ~ 5.0, + war_name == "Ecuadorian War of Independence" ~ 5.0, + war_name == "Peruvian War of Independence" ~ 4.8, + war_name == "Brazilian War of Independence" ~ 5.2, + war_name == "November Uprising" ~ 5.3, + war_name == "Second Turko-Egyptian War" ~ 5.0, + war_name == "Farroupilha Revolution" ~ 5.3, + war_name == "First Anglo-Afghan War" ~ 4.8, + war_name == "Hungarian War of Independence" ~ 4.52, + war_name == "War of the Roman Republic" ~ 5.3, + war_name == "Montenegrin-Ottoman War" ~ 4.86, + war_name == "Indian Rebellion of 1857" ~ 5.3, + war_name == "Austro-Sardinian War of 1859" ~ 4.9, + war_name == "Nien (Nian) Rebellion" ~ 5.2, + war_name == "Taiping Rebellion" ~ 4.1, + war_name == "American Civil War" ~ 4.7, + war_name == "Boshin War" ~ 4.9, + war_name == "Satsuma Rebellion" ~ 5.47, + war_name == "Thousand Days' War" ~ 5.45, + war_name == "Xinhai Revolution" ~ 5.0, + war_name == "Finnish Civil War" ~ 5.0, + war_name == "Lithuanian-Soviet War" ~ 5.35, + war_name == "Latvian War of Independence" ~ 4.73, + war_name == "Estonian War of Independence" ~ 4.35, + war_name == "Russian Civil War" ~ 6.85, + war_name == "Warlord Era Wars" ~ 6.15, + war_name == "Spanish Civil War" ~ 5.0, + war_name == "Chinese Civil War" ~ 5.0, + war_name == "Nigerian-Biafran War" ~ 4.9, + war_name == "Black September War of 1970" ~ 4.9, + war_name == "Bangladesh War" ~ 5.15, + war_name == "Ogaden War" ~ 4.95, + war_name == "Angolan Civil War" ~ 5.85, + war_name == "Dniestrian Independence War" ~ 5.27, + war_name == "Bosnian War" ~ 4.4, + war_name == "Rwanda War 1994" ~ 5.5, + war_name == "Yemen Civil War" ~ 5.15, + war_name == "Second Congo War" ~ 5.3, + war_name == "Sri Lanka-Tamil War II" ~ 5.37, + + war_type == "INTERSTATE WARS" ~ runif(n(), 3.85, 4.15), # default y-position for interstate wars + war_type == "CIVIL WARS" ~ runif(n(), 4.85, 5.15), # default y-position for civil wars + TRUE ~ 5.0 +), + + + y_plot = scales::rescale(y_manual, to = c(0.5, 1.5), from = c(0, 10)), # rescale: convert 0-10 scale to 0.5-1.5 for plotting + x_plot = midpoint # x-coordinate is the midpoint of war years (variable from dataset) +) + +data <- data |> + mutate( + region = recode(region, + "Cross-Regional" = "Multiple regions", + "North Africa and Middle East" = "North Africa & Middle East") + ) + +max_deaths <- max(data$avg_deaths) +min_deaths <- min(data$avg_deaths) +``` + +## Details for Visualization (Colors, Fonts and Labels) + +```{r colors font and labels} +region_colors <- c( + "Multiple regions" = "#AF1B45", + "Americas" = "#E46E5A", + "Asia" = "#58AB8B", + "Europe" = "#FAAF3B", + "North Africa & Middle East" = "#79B6F2", + "Sub-Saharan Africa" = "#4C6A9B" +) + +font_add(family = "Castoro", + regular = "/Users/adelasolisolis/Data Visualization/dataviz/Castoro/Castoro-Regular.ttf") # custom font from google fonts + +showtext_auto() +showtext_opts(dpi = 96) + + +# manual positioning for labels (INTERSTATE) +interstate_labels <- tribble( + ~war_name, ~label_y, ~formatted_name, + "Napoleonic Wars", 5.7, "Napoleonic Wars", + "Crimean War", 5.5, "Crimean War", + "Korean War", 1.5, "Korean War", + "Suez Crisis", 3.0, "Suez Crisis", + "Vietnam War", 1.0, "Vietnam War", + "Yom Kippur War", 5.3, "Yom Kippur War", + "Iran-Iraq War", 2.0, "Iran-Iraq War", + "Persian Gulf War", 5.8, "Persian Gulf War", + "Ethiopian-Eritrean War", 1.5, "Ethiopian-\nEritrean War", # line break + "Third Sino-Japanese War", 0.2, "Second Sino-\nJapanese War" # renamed (error in dataset) + line break +) |> + left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # add death range estimate + by = "war_name") |> + mutate( + # use formatted_name in label + label_text = ifelse( + war_name == "Third Sino-Japanese War", + paste0(formatted_name, "\n", + floor(war_deaths_low/1000000 * 10) / 10, "–", + floor(war_deaths_high/1000000 * 10) / 10, "m"), # death range in millions + paste0(formatted_name, "\n", + floor(war_deaths_low/1000), "–", + floor(war_deaths_high/1000), "k") # death range in thousands + ), + label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling + ) + +# manual positioning for labels (CIVIL) +civil_labels <- tribble( + ~war_name, ~label_y, ~formatted_name, + "Venezuelan War of Independence", 7.2, "Venezuelan War\nof Independence", + "American Civil War", 2.6, "American Civil War", + "Russian Civil War", 9.2, "Russian Civil War", + "Warlord Era Wars", 3.5, "Warlord Era Wars", + "Spanish Civil War", 6.6, "Spanish Civil War", + "Chinese Civil War", 1.8, "Chinese Civil War", + "Angolan Civil War", 7.6, "Angolan Civil War", + "Bosnian War", 1.6, "Bosnian War" +) |> + left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # also add death estimate range + by = "war_name") |> + mutate( + label_text = ifelse( + war_name == "Chinese Civil War", + paste0(formatted_name, "\n", + floor(war_deaths_low/1000000 * 10) / 10, "–", + floor(war_deaths_high/1000000 * 10) / 10, "m"), + paste0(formatted_name, "\n", + floor(war_deaths_low/1000), "–", + floor(war_deaths_high/1000), "k") + ), + label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling + ) +``` + +## Create the Plot (Faceting, Color Scale, Size Scale, X / Y-Axis Scale, Labels and Theme Details) + +```{r plot display, fig.width=12, fig.height=11.1, fig.showtext=TRUE} +graph_interstate <- data |> + filter(war_type == "INTERSTATE WARS") |> + ggplot(aes(x = x_plot, y = y_plot)) + + + # lines connecting circles to external labels (added first so that they appear behind the circles) + geom_segment( + data = interstate_labels |> + left_join(data |> + select(war_name, y_plot), by = "war_name"), + aes(x = x_plot, + y = y_plot, + xend = x_plot, + yend = label_y_plot), + color = "gray40", + linewidth = 0.3 + ) + + + # plot the circles that represent wars + geom_point(aes(size = avg_deaths, + color = region), + alpha = 1) + + + # white labels for WWI and WWII (inside the circles) + geom_text( + data = data |> filter(war_name %in% c("World War II", "World War I")), + aes(label = paste0(war_name, "\n", + floor(war_deaths_low/1000000 * 10) / 10, "–", + floor(war_deaths_high/1000000 * 10) / 10, "m deaths")), + size = 2.7, + color = "white", + fontface = "bold", + lineheight = 0.9 + ) + + + # labels outside the circles for other wars + geom_text( + data = interstate_labels, + aes(x = x_plot, y = label_y_plot, label = label_text), + size = 2.9, + color = "black", + lineheight = 0.9 + ) + + + # "INTERSTATE WARS" panel title at top + annotate("text", + x = 1800, + y = 1.55, + label = "INTERSTATE WARS", + size = 5, + fontface = "bold", + hjust = 0) + # left-side + + scale_color_manual(values = region_colors, + name = NULL, + breaks = names(region_colors)) + + + # circle area proportional to value + scale_size_area(max_size = 82, + limits = c(min(data$avg_deaths), + max(data$avg_deaths)), + guide = "none") + + + scale_x_continuous(limits = c(1800, 2015), # x-axis scale + breaks = c(seq(1800, 2000, by = 20), + 2011), # marks every 20 years (+ 2011) + expand = c(0.01, 0), + position = "bottom") + # timeline at bottom of this panel + scale_y_continuous(limits = c(0.4, 1.6), # y-axis scale + expand = c(0, 0)) + + + labs(title = "Combatant deaths in conventional wars, 1800–2011", + subtitle = "Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can\nmake the death tolls much larger.", + x = NULL, y = NULL) + + + theme_minimal() + + theme( + panel.background = element_rect(fill = "#faf8f2", color = NA), + plot.background = element_rect(fill = "#faf8f2", color = NA), + panel.grid.major.y = element_blank(), + panel.grid.minor = element_blank(), + panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3), + axis.text.x = element_text(size = 11), # show x-axis numbers here (timeline) + axis.text.y = element_blank(), # no y-axis numbers + axis.ticks = element_blank(), + plot.title = element_text(size = 24, face = "bold", # font for title + family = "Castoro", + margin = margin(b = 5)), + + plot.subtitle = element_text(size = 14, color = "gray30", # font for subtitle + family = "Castoro", + margin = margin(b = 15)), + plot.margin = margin(10, 10, 10, 10), + legend.position = "top", + legend.justification = "left", + legend.direction = "horizontal", + legend.text = element_text(size = 10) + ) + + + # region legend + guides(color = guide_legend( + override.aes = list(shape = 15, # show colors as squares + size = 4.7), + nrow = 1 + )) + +graph_civil <- data |> + filter(war_type == "CIVIL WARS") |> + ggplot(aes(x = x_plot, y = y_plot)) + + + geom_segment( + data = civil_labels |> + left_join(data |> select(war_name, y_plot), by = "war_name"), + aes(x = x_plot, y = y_plot, xend = x_plot, yend = label_y_plot), + color = "gray40", + size = 0.3 + ) + + + geom_point(aes(size = avg_deaths, color = region), alpha = 1) + + + geom_text( + data = civil_labels, + aes(x = x_plot, y = label_y_plot, label = label_text), + size = 2.9, + color = "black", + lineheight = 0.9 + ) + + + annotate("text", x = 1800, y = 1.55, label = "CIVIL WARS", + size = 5, fontface = "bold", hjust = 0) + + + scale_color_manual(values = region_colors, name = NULL, + breaks = names(region_colors)) + + scale_size_area(max_size = 80, + limits = c(min(data$avg_deaths), max(data$avg_deaths)), + guide = "none") + + + scale_x_continuous(limits = c(1800, 2015), + breaks = c(seq(1800, 2000, by = 20), 2011), + expand = c(0.01, 0)) + + scale_y_continuous(limits = c(0.4, 1.6), expand = c(0, 0)) + + + labs(x = NULL, y = NULL, # remove axis labels + caption = "Note: Each circle is sized according to the war's lower death estimate. A conventional war is defined here as an armed conflict fought with differentiated militaries and clear frontlines that\ncaused at least 500 combatant deaths due to fighting over its duration. A civil war is a conflict between combatants that were previously part of the same state, with at least one group now\nseeking control or secession.\nSources: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.\nOurWorldInData.org — Research and data to make progress against the world's largest problems. Licensed under CC-BY by the authors Bastian Herre, Christian Schwinehart and Klara Auerbach.") + + + theme_minimal() + + theme( + panel.background = element_rect(fill = "#faf8f2", color = NA), + plot.background = element_rect(fill = "#faf8f2", color = NA), + panel.grid.major.y = element_blank(), + panel.grid.minor = element_blank(), + panel.grid.major.x = element_line(color = "gray90", size = 0.3), + axis.text.x = element_blank(), # no timeline here + axis.text.y = element_blank(), + axis.ticks = element_blank(), + plot.caption = element_text(size = 9.7, color = "gray50", hjust = 0, margin = margin(t = 15)), + plot.margin = margin(10, 10, 10, 10), + legend.position = "none" + ) + +# combine interstate wars + civil wars +combined_graph <- graph_interstate / graph_civil + + plot_layout(heights = c(7, 3)) + +combined_graph +``` + +# Graph Improvement + +## Data Preparation + +```{r data preparation 2} +# calculate average deaths from low and high estimates +data <- data |> + mutate( + avg_deaths = (war_deaths_low + war_deaths_high) / 2, + deaths_thousands = avg_deaths / 1000, + deaths_millions = avg_deaths / 1000000, + war_type = ifelse(civil_war == "Civil war", "Civil war", "Interstate war"), + + # recode regions + region = case_when( + region == "Americas" ~ "Americas", + region == "Asia" ~ "Asia", + region == "Europe" ~ "Europe", + region == "North Africa and Middle East" ~ "North Africa\n& Middle East", + region == "Sub-Saharan Africa" ~ "Sub-Saharan Africa", + TRUE ~ region + ), + + # fix incorrect naming + war_name = ifelse(war_name == "Third Sino-Japanese War", + "Second Sino-Japanese War", + war_name) + ) +``` + +## Create the Plot + +```{r plot display 2, fig.width=12, fig.height=15} +# UPPER CHART: select top 10 deadliest wars per region (excluding World Wars) +top_wars_by_region <- data |> + filter(!war_name %in% c("World War I", "World War II")) |> + + # remove other second sino-japanese war + filter(!(war_name == "Second Sino-Japanese War" & avg_deaths < 100000)) |> + group_by(region) |> # top 10 per region + arrange(desc(avg_deaths)) |> + slice_head(n = 10) |> + ungroup() + +war_type_colors <- c( + "Civil war" = "#d73027", + "Interstate war" = "#4575b4" +) + +# plot: bar chart +upper_chart <- ggplot(top_wars_by_region, + aes(x = deaths_thousands, + y = fct_reorder(war_name, avg_deaths), + fill = war_type)) + + + geom_col(width = 0.7, alpha = 0.9) + + + # labels showing death counts + geom_text( + aes(label = ifelse( + deaths_thousands >= 1000, + paste0(round(deaths_millions, 1), "M"), # when millions "M" + paste0(round(deaths_thousands, 0), "k") # when thousands "k" + )), + hjust = -0.1, # position slightly to the right of the bar's end + size = 2.3, + fontface = "bold", + color = "gray20" + ) + + + # each region gets its own panel (vertically) + facet_wrap(~region, scales = "free_y", ncol = 1, strip.position = "left") + + + scale_fill_manual(values = war_type_colors, name = "War Type") + + + scale_x_continuous( + breaks = seq(0, 2500, 500), # marks every 500k + labels = function(x) { + ifelse(x >= 1000, + paste0(x / 1000, "M"), # "M" if > = 1000k + paste0(x, "k")) # keep as "k" otherwise + }, + expand = expansion(mult = c(0, 0.15)) + ) + + + labs( + title = "Deadliest Wars by Region, 1800–2011", + subtitle = "Top 10 conflicts with highest death toll per region (excluding World Wars)", + x = "Average Deaths", + y = NULL + ) + + + theme_minimal() + + theme( + panel.background = element_rect(fill = "#faf8f2", color = NA), + plot.background = element_rect(fill = "#faf8f2", color = NA), + panel.grid.major.y = element_blank(), + panel.grid.minor = element_blank(), + panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3), + strip.text.y.left = element_text(size = 14, face = "bold", color = "gray20", angle = 0, + hjust = 0, margin = margin(l = 0, r = 5)), + strip.background = element_rect(fill = NA, color = NA), + strip.placement = "outside", + panel.spacing.y = unit(0.5, "lines"), # spacing between facets + axis.text.y = element_text(size = 10, face = "bold"), + axis.text.x = element_text(size = 9), + plot.title = element_text(size = 18, face = "bold", margin = margin(b = 5)), + plot.subtitle = element_text(size = 10, color = "gray30", margin = margin(b = 10)), + legend.position = "top", + legend.box = "horizontal", + legend.title = element_text(size = 9, face = "bold"), + legend.text = element_text(size = 8), + plot.margin = margin(10, 10, 5, 5) + ) + +# BOTTOM CHART: calculate TOTAL deaths per region and war type +regional_summary <- data |> + filter(!war_name %in% c("World War I", "World War II")) |> + group_by(region, war_type) |> + summarise( + total_deaths = sum(avg_deaths), + n_wars = n(), + .groups = "drop" + ) |> + mutate( + # civil war values are negative so they extend LEFT + deaths_millions = ifelse(war_type == "Civil war", + -total_deaths / 1000000, + total_deaths / 1000000) + ) + +# calculate total per region for ordering +region_totals <- regional_summary |> + group_by(region) |> + summarise(total = sum(abs(deaths_millions)), .groups = "drop") + +bottom_chart <- ggplot(regional_summary, + aes(x = deaths_millions, + y = fct_reorder(region, abs(deaths_millions), .fun = sum), + fill = war_type)) + + + geom_col(alpha = 0.9, width = 0.7) + + + # vertical line at center + geom_vline(xintercept = 0, color = "gray30", linewidth = 0.5) + + + # labels for civil wars (left side) + geom_text( + data = regional_summary |> filter(war_type == "Civil war"), + aes(label = ifelse( + abs(deaths_millions) >= 1, + paste0(round(abs(deaths_millions), 1), "M"), + paste0(round(abs(deaths_millions) * 1000, 0), "k") + )), + hjust = 1.1, size = 3.5, fontface = "bold", color = "gray20" + ) + + + # labels for interstate wars (right side) + geom_text( + data = regional_summary |> filter(war_type == "Interstate war"), + aes(label = ifelse( + deaths_millions >= 1, + paste0(round(deaths_millions, 1), "M"), + paste0(round(deaths_millions * 1000, 0), "k") + )), + hjust = -0.1, size = 3.5, fontface = "bold", color = "gray20" + ) + + + scale_fill_manual(values = war_type_colors) + + + # custom x-axis to show absolute values + scale_x_continuous( + labels = function(x) paste0(abs(x), "M"), # show all values as positive + breaks = seq(-5, 5, 1), + limits = c(-5.5, 5.5) + ) + + + labs( + title = "Total War Deaths by Region and Type", + subtitle = "All conflicts 1800–2011 (excluding World Wars) | Civil wars (left) vs Interstate wars (right)", + x = "Total Deaths", + y = NULL + ) + + + theme_minimal() + + theme( + panel.background = element_rect(fill = "#faf8f2", color = NA), + plot.background = element_rect(fill = "#faf8f2", color = NA), + panel.grid.major.y = element_blank(), + panel.grid.minor.x = element_blank(), + panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3), + axis.text.y = element_text(size = 12, face = "bold"), + axis.text.x = element_text(size = 10), + plot.title = element_text(size = 16, face = "bold", margin = margin(b = 5)), + plot.subtitle = element_text(size = 11, color = "gray30", margin = margin(b = 10)), + axis.title.x = element_text(size = 12, face = "bold"), + legend.position = "none", + plot.margin = margin(10, 10, 10, 10) + ) + +# using patchwork to stack the two plots vertically +final_plot <- upper_chart / bottom_chart + + plot_layout(heights = c(4, 1)) + # upper plot 4 times taller than bottom plot + plot_annotation( + caption = "Source: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.", + theme = theme( + plot.caption = element_text(size = 9, color = "gray50", hjust = 0, margin = margin(t = 10)), + plot.background = element_rect(fill = "#faf8f2", color = NA) + ) + ) + +final_plot +``` + diff --git a/_projects/2025/100566135/100566135.html b/_projects/2025/100566135/100566135.html new file mode 100644 index 00000000..fded1122 --- /dev/null +++ b/_projects/2025/100566135/100566135.html @@ -0,0 +1,3157 @@ + + + + + + + + + + + + + + + + + + + + + Combatant deaths in conventional wars, 1800-2011 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Combatant deaths in conventional wars, 1800-2011

+ + +
+
2025
+
+ +

Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can make the death tolls much larger.

+
+ +
+ + Adela Solís + +
2025-12-15 +
+ +
+
+ +
+

Graph Replication

+

Loading Libraries and Data

+
+
+
library(tidyverse)
+library(scales)
+library(patchwork)
+library(showtext)
+
+data <- read.csv("wars_by_deaths_mars.csv")
+
+
+

Data Preparation

+
+
+
set.seed(123)
+data <- data |> 
+  mutate( # calculating average deaths for sizing
+    avg_deaths = (war_deaths_low + war_deaths_high) / 2, 
+    deaths_millions = avg_deaths / 1000000,
+    war_type = ifelse(civil_war == "Civil war", "CIVIL WARS", "INTERSTATE WARS"),
+    war_type = factor(war_type, levels = c("INTERSTATE WARS", "CIVIL WARS")),
+    
+    y_manual = case_when( # here i manually assign a 'y_manual' value to each war to ensure exact spread, each war gets a specific y-coordinate (0-10 scale)
+  
+  # INTERSTATE WARS (positioned around y = 4.0)
+  war_name == "Second Maratha War" ~ 4.17,   
+  war_name == "Napoleonic Wars" ~ 4.7,       
+  war_name == "Anglo-Turkish War" ~ 3.95,    
+  war_name == "Russo-Turkish War" ~ 3.67,    
+  war_name == "Russo-Persian War" ~ 4.17,    
+ 
+  war_name == "War of 1812" ~ 4.0,           
+  war_name == "Wahhabi War" ~ 4.3,           
+  war_name == "Neapolitan War" ~ 3.87,       
+  war_name == "Gurkha War" ~ 4.1,            
+  war_name == "Bombardment of Algiers" ~ 4.0, 
+  war_name == "Third Maratha War" ~ 4.15,    
+  war_name == "Durrani Empire-Sikh War" ~ 3.7, 
+  war_name == "Fifth Cape Frontier War" ~ 4.0, 
+  
+  war_name == "Turko Persian War" ~ 4.0,     
+  war_name == "Ashanti-British War" ~ 4.15,  
+  war_name == "First Anglo-Burmese War" ~ 3.78, 
+  war_name == "Siege of Bharatpur" ~ 4.0,    
+  war_name == "Argentine-Brazilian War" ~ 4.15, 
+  war_name == "Vientiane-Siam War" ~ 3.6,    
+  war_name == "Second Russo-Persian War" ~ 3.9, 
+  war_name == "Russo-Turkish War of 1828-29" ~ 4.3, 
+  war_name == "Gran Colombia-Peru War" ~ 4.05, 
+  war_name == "French-Algerian War" ~ 4.0,   
+  
+  war_name == "Siamese-Vietnamese War" ~ 4.0, 
+  war_name == "Afghan-Sikh War" ~ 4.0,       
+  war_name == "Afghan-Persian War" ~ 3.78,   
+  war_name == "War of the Confederation" ~ 4.17, 
+  war_name == "First Opium War" ~ 4.23,      
+  war_name == "Bolivia-Peru War" ~ 4.0,       
+  war_name == "Sino-Sikh War" ~ 3.78,        
+  war_name == "Siamese-Vietnamese War II" ~ 4.35,  
+  war_name == "Gwalior War" ~ 4.1,           
+  war_name == "Anglo-Baluch War" ~ 3.8,      
+  war_name == "Franco-Moroccan War" ~ 4.0,   
+  
+  war_name == "Mexican-American War" ~ 3.78, 
+  war_name == "Second Dominican War" ~ 4.23,  
+  war_name == "Seventh Cape Frontier War" ~ 4.0, 
+  war_name == "First Anglo-Sikh War" ~ 3.53, 
+  war_name == "Austro-Sardinian War of 1848" ~ 4.33,  
+  war_name == "First Schleswig-Holstein War" ~ 4.0, 
+  war_name == "First Egba-Dahomey War" ~ 3.8, 
+  war_name == "Eighth Cape Frontier War" ~ 4.0,  
+  war_name == "La Plata War" ~ 4.23,      
+  war_name == "Tukolor-Tamba War" ~ 4.1, 
+  war_name == "Crimean War" ~ 4.6,         
+  war_name == "Tukolor-Bambara War of 1855" ~ 4.2, 
+  war_name == "Tibet-Nepalese War" ~ 3.75,   
+  war_name == "Fourth Dominican War" ~ 3.95, 
+  war_name == "Central American National War" ~ 4.25,
+  war_name == "Anglo-Persian War" ~ 4.03, 
+  war_name == "Franco-Tukulor War" ~ 4.23,  
+  war_name == "Second Opium War" ~ 4.03,     
+  war_name == "Hispano-Moroccan War" ~ 3.78, 
+  war_name == "Two Sicilies Insurrection" ~ 4.2, 
+  war_name == "Papal States War" ~ 4.0,      
+  war_name == "Tukulor-Bambara War of 1860" ~ 4.43, 
+  
+  war_name == "Central American War" ~ 4.2,  
+  war_name == "Ecuadorian-Colombian War" ~ 4.0, 
+  war_name == "Second Schleswig-Holstein War" ~ 3.67, 
+  war_name == "Second Egba-Dahomey War" ~ 4.04, 
+  war_name == "Franco-Mexican War" ~ 3.4,    
+  war_name == "Russia-Khokandian War" ~ 3.87, 
+  war_name == "Sino-Kuchean Muslim War" ~ 4.23, 
+  war_name == "Sino-Khokandian War" ~ 4.06, 
+  war_name == "Russia-Bukhara Khanate War" ~ 3.77, 
+  war_name == "Austro-Prussian War" ~ 3.5,   
+  war_name == "Paraguayan War" ~ 4.2,        
+  war_name == "British Abyssinian Expedition" ~ 3.8, 
+  war_name == "Franco-Prussian War" ~ 4.5, 
+  war_name == "Sino-Jahriyya Order War" ~ 3.55, 
+  war_name == "Ottoman Conquest of Arabia" ~ 3.8, 
+  war_name == "Kashgaria-Urumchi Dungan War" ~ 4.05, 
+  
+  war_name == "Anglo-Ashanti War" ~ 4.17,    
+  war_name == "Egypt-Abyssinian War" ~ 3.55, 
+  war_name == "Russia-Khokand Khanate War" ~ 4.2, 
+  war_name == "First Central American War" ~ 4.0, 
+  war_name == "Sino-Kashgarian War" ~ 3.8,   
+  war_name == "Russo-Turkish War of 1877-78" ~ 4.3, 
+  war_name == "Ninth Cape Frontier War" ~ 4.0, 
+  war_name == "British-Zulu War" ~ 3.77,     
+  war_name == "Second Anglo-Afghan War" ~ 4.23, 
+  war_name == "Russo-Turkomen War" ~ 4.0,   
+  
+  war_name == "War of the Pacific" ~ 3.77,
+  war_name == "Anglo-Egyptian War" ~ 4.0,
+  war_name == "Sino-French (Tonkin) War" ~ 4.15,
+  war_name == "Second Central American War" ~ 4.0,
+  war_name == "Serbo-Bulgarian War" ~ 4.2,
+  war_name == "Ethiopian-Mahdi War" ~ 3.73,
+  war_name == "War of Dogali" ~ 4.0,
+  war_name == "Mahdi-Egyptian War" ~ 4.0,
+
+  war_name == "Franco-Dahomean War" ~ 4.1,
+  war_name == "Franco-Mandingo War V" ~ 4.0,
+  war_name == "Congo Arab War" ~ 4.37,
+  war_name == "Bornu Empire-Rabah Empire War" ~ 3.75,
+  war_name == "France-Tukolor Empire War" ~ 4.05,
+  war_name == "Melilla War" ~ 4.2,
+  war_name == "Mahdist-Italian War" ~ 3.9,
+  war_name == "First Matabele War" ~ 4.1,
+  war_name == "First Sino-Japanese War" ~ 3.9,
+  war_name == "Japanese Invasion of Taiwan" ~ 4.3,
+  war_name == "Portugal-Gaza Nguni War" ~ 4.1,
+  war_name == "Second Franco-Hova War" ~ 4.01,
+  war_name == "First Italo-Abyssinian War" ~ 3.73,
+  war_name == "British-Mahdi War" ~ 3.85,
+  war_name == "Spanish-American War" ~ 4.15,
+  war_name == "Franco-Mandingo War VIII" ~ 4.07,
+  war_name == "Second Anglo-Boer War" ~ 4.2,
+  war_name == "War of the Golden Stool" ~ 4.27,
+  war_name == "British-Sokoto Caliphate War" ~ 3.8,
+  war_name == "Franco-Rabah Empire War" ~ 4.0,
+  
+  war_name == "Boxer Rebellion" ~ 4.05,
+  war_name == "Russo-Japanese War" ~ 4.3,
+  war_name == "Third and Fourth Central American War" ~ 4.05,
+  war_name == "Second Spanish-Moroccan War" ~ 4.15,
+  war_name == "Greco-Turkish War" ~ 3.8,
+  war_name == "Wadai War" ~ 4.0,
+  war_name == "Italo-Turkish War" ~ 4.15,
+  war_name == "Second Balkan War" ~ 3.7,
+  war_name == "First Sino-Tibet War" ~ 4.0,
+  
+  war_name == "World War I" ~ 1.65,           
+  war_name == "Second Sino-Tibet War" ~ 4.0,
+  war_name == "Polish-Ukrainian War" ~ 4.5,
+  war_name == "Czech-Polish War" ~ 4.3,
+  war_name == "Hungarian Adversaries War" ~ 3.75,
+  war_name == "Third Anglo-Afghan War" ~ 4.1,
+  war_name == "Soviet-Polish War" ~ 3.5,
+  war_name == "Waziristan Campaign" ~ 4.0,
+  war_name == "Franco-Turkish War" ~ 4.2,
+  war_name == "Turkish-Armenian War" ~ 3.8,
+  war_name == "Azeri-Armenian War" ~ 4.1,
+  war_name == "Polish-Lithuanian War" ~ 4.0,
+  war_name == "Soviet-Georgia War" ~ 3.7,
+  war_name == "Hejaz War" ~ 4.0,
+  
+  war_name == "Second Sino-Japanese War" ~ 4.4, 
+  war_name == "Third Sino-Japanese War" ~ 2.85, 
+  war_name == "World War II" ~ 7.9,         
+  war_name == "Sino-Soviet War" ~ 4.0, 
+  war_name == "Chaco War" ~ 3.7,
+  war_name == "East Turkestan Kashgar War" ~ 4.25, 
+  war_name == "Saudi-Yemeni War" ~ 4.01, 
+  war_name == "Second Italo-Abyssinian War" ~ 3.9,
+  war_name == "Battle of Lake Khasan" ~ 4.01, 
+  war_name == "Battle of Khalkhin Gol" ~ 4.2,
+  war_name == "Peruvian-Ecuadorian War" ~ 4.0, 
+  war_name == "East Turkestan Gulja Incident" ~ 4.0, 
+  war_name == "India-Pakistan War of 1947" ~ 4.0, 
+  war_name == "Operation Polo" ~ 4.2,
+  war_name == "1948 Palestine War" ~ 3.8,
+  war_name == "Korean War" ~ 4.6,            
+  war_name == "Suez Crisis" ~ 3.95,          
+  war_name == "Second Taiwan Strait Crisis" ~ 4.09,
+  
+  war_name == "Sino-Indian War" ~ 3.95,
+  war_name == "India-Pakistan War of 1965" ~ 3.95,
+  war_name == "Six Day War" ~ 3.95,
+  war_name == "Vietnam War" ~ 3.22,
+  war_name == "Football War" ~ 3.95,
+  war_name == "War of Attrition" ~ 4.09, 
+  war_name == "Yom Kippur War" ~ 4.0,       
+  war_name == "North Vietnam-South Vietnam War" ~ 4.25,   
+  war_name == "Vietnamese-Cambodian War" ~ 4.0,       
+  war_name == "Uganda-Tanzania War" ~ 4.09, 
+  war_name == "First Sino-Vietnamese War" ~ 3.8,
+  war_name == "Yemen Border War II" ~ 4.0,    
+  war_name == "Falklands War" ~ 4.0,    
+  war_name == "Lebanese War of 1982-84" ~ 4.09,
+  war_name == "Iran-Iraq War" ~ 3.6,        
+  war_name == "Toyota War" ~ 4.1,
+  war_name == "Second Sino-Vietnamese War" ~ 4.0,  
+  war_name == "Iraq-Kuwait War" ~ 4.0,  
+  war_name == "Persian Gulf War" ~ 4.25,  
+  war_name == "Nagorno-Karabakh War" ~ 4.0, 
+  war_name == "US-Afghan" ~ 4.25,  
+  war_name == "Ethiopian-Eritrean War" ~ 3.7, 
+  war_name == "Kargil Conflict" ~ 4.0,
+  war_name == "US-Iraq War" ~ 4.0,
+  war_name == "Israel-Hezbollah War" ~ 4.0,
+  
+  # CIVIL WARS (positioned around y = 5.0)
+  war_name == "Argentine War of Independence" ~ 5.0,
+  war_name == "Venezuelan War of Independence" ~ 5.3,
+  war_name == "Chilean War of Independence" ~ 5.0,
+  war_name == "Ecuadorian War of Independence" ~ 5.0,
+  war_name == "Peruvian War of Independence" ~ 4.8,
+  war_name == "Brazilian War of Independence" ~ 5.2,
+  war_name == "November Uprising" ~ 5.3,
+  war_name == "Second Turko-Egyptian War" ~ 5.0,
+  war_name == "Farroupilha Revolution" ~ 5.3,
+  war_name == "First Anglo-Afghan War" ~ 4.8,
+  war_name == "Hungarian War of Independence" ~ 4.52,
+  war_name == "War of the Roman Republic" ~ 5.3,
+  war_name == "Montenegrin-Ottoman War" ~ 4.86,
+  war_name == "Indian Rebellion of 1857" ~ 5.3,
+  war_name == "Austro-Sardinian War of 1859" ~ 4.9,
+  war_name == "Nien (Nian) Rebellion" ~ 5.2,
+  war_name == "Taiping Rebellion" ~ 4.1,
+  war_name == "American Civil War" ~ 4.7,
+  war_name == "Boshin War" ~ 4.9,
+  war_name == "Satsuma Rebellion" ~ 5.47,
+  war_name == "Thousand Days' War" ~ 5.45,
+  war_name == "Xinhai Revolution" ~ 5.0,
+  war_name == "Finnish Civil War" ~ 5.0,
+  war_name == "Lithuanian-Soviet War" ~ 5.35,
+  war_name == "Latvian War of Independence" ~ 4.73,
+  war_name == "Estonian War of Independence" ~ 4.35,
+  war_name == "Russian Civil War" ~ 6.85,
+  war_name == "Warlord Era Wars" ~ 6.15,
+  war_name == "Spanish Civil War" ~ 5.0,
+  war_name == "Chinese Civil War" ~ 5.0,
+  war_name == "Nigerian-Biafran War" ~ 4.9,
+  war_name == "Black September War of 1970" ~ 4.9,
+  war_name == "Bangladesh War" ~ 5.15,
+  war_name == "Ogaden War" ~ 4.95,
+  war_name == "Angolan Civil War" ~ 5.85,
+  war_name == "Dniestrian Independence War" ~ 5.27,
+  war_name == "Bosnian War" ~ 4.4,
+  war_name == "Rwanda War 1994" ~ 5.5,
+  war_name == "Yemen Civil War" ~ 5.15,
+  war_name == "Second Congo War" ~ 5.3,
+  war_name == "Sri Lanka-Tamil War II" ~ 5.37,
+
+  war_type == "INTERSTATE WARS" ~ runif(n(), 3.85, 4.15), # default y-position for interstate wars
+  war_type == "CIVIL WARS" ~ runif(n(), 4.85, 5.15), # default y-position for civil wars
+  TRUE ~ 5.0
+),
+
+
+    y_plot = scales::rescale(y_manual, to = c(0.5, 1.5), from = c(0, 10)), # rescale: convert 0-10 scale to 0.5-1.5 for plotting
+    x_plot = midpoint # x-coordinate is the midpoint of war years (variable from dataset)
+)
+
+data <- data |>
+  mutate(
+    region = recode(region, 
+                    "Cross-Regional" = "Multiple regions",
+                    "North Africa and Middle East" = "North Africa & Middle East") 
+  )
+
+max_deaths <- max(data$avg_deaths)
+min_deaths <- min(data$avg_deaths)
+
+
+

Details for Visualization (Colors, Fonts and Labels)

+
+
+
region_colors <- c(
+  "Multiple regions" = "#AF1B45",
+  "Americas" = "#E46E5A",
+  "Asia" = "#58AB8B",
+  "Europe" = "#FAAF3B",
+  "North Africa & Middle East" = "#79B6F2",
+  "Sub-Saharan Africa" = "#4C6A9B"
+)
+
+font_add(family = "Castoro", 
+         regular = "/Users/adelasolisolis/Data Visualization/dataviz/Castoro/Castoro-Regular.ttf")  # custom font from google fonts
+
+showtext_auto()
+showtext_opts(dpi = 96) 
+
+
+# manual positioning for labels (INTERSTATE)
+interstate_labels <- tribble(
+  ~war_name, ~label_y, ~formatted_name,
+  "Napoleonic Wars", 5.7, "Napoleonic Wars",
+  "Crimean War", 5.5, "Crimean War",
+  "Korean War", 1.5, "Korean War",
+  "Suez Crisis", 3.0, "Suez Crisis",
+  "Vietnam War", 1.0, "Vietnam War",
+  "Yom Kippur War", 5.3, "Yom Kippur War",
+  "Iran-Iraq War", 2.0, "Iran-Iraq War",
+  "Persian Gulf War", 5.8, "Persian Gulf War",
+  "Ethiopian-Eritrean War", 1.5, "Ethiopian-\nEritrean War",  # line break 
+  "Third Sino-Japanese War", 0.2, "Second Sino-\nJapanese War"  # renamed (error in dataset) + line break
+) |>
+  left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # add death range estimate
+            by = "war_name") |>
+  mutate(
+    # use formatted_name in label
+    label_text = ifelse(
+      war_name == "Third Sino-Japanese War",
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000000 * 10) / 10, "–", 
+             floor(war_deaths_high/1000000 * 10) / 10, "m"), # death range in millions
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000), "–", 
+             floor(war_deaths_high/1000), "k")  # death range in thousands
+    ),
+    label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling
+  )
+
+# manual positioning for labels (CIVIL)
+civil_labels <- tribble(
+  ~war_name, ~label_y, ~formatted_name,
+  "Venezuelan War of Independence", 7.2, "Venezuelan War\nof Independence",  
+  "American Civil War", 2.6, "American Civil War",
+  "Russian Civil War", 9.2, "Russian Civil War",
+  "Warlord Era Wars", 3.5, "Warlord Era Wars",
+  "Spanish Civil War", 6.6, "Spanish Civil War",
+  "Chinese Civil War", 1.8, "Chinese Civil War",
+  "Angolan Civil War", 7.6, "Angolan Civil War",
+  "Bosnian War", 1.6, "Bosnian War"
+) |>
+  left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # also add death estimate range
+            by = "war_name") |>
+  mutate(
+    label_text = ifelse(
+      war_name == "Chinese Civil War",
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000000 * 10) / 10, "–", 
+             floor(war_deaths_high/1000000 * 10) / 10, "m"),
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000), "–", 
+             floor(war_deaths_high/1000), "k")
+    ),
+    label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling
+  )
+
+
+

Create the Plot (Faceting, Color Scale, Size Scale, X / Y-Axis Scale, Labels and Theme Details)

+
+
+
graph_interstate <- data |> 
+  filter(war_type == "INTERSTATE WARS") |>
+  ggplot(aes(x = x_plot, y = y_plot)) +
+   
+  # lines connecting circles to external labels (added first so that they appear behind the circles)
+  geom_segment(
+    data = interstate_labels |> 
+      left_join(data |>
+                  select(war_name, y_plot), by = "war_name"),
+    aes(x = x_plot, 
+        y = y_plot, 
+        xend = x_plot, 
+        yend = label_y_plot),
+    color = "gray40",
+    linewidth = 0.3
+  ) +
+  
+  # plot the circles that represent wars
+  geom_point(aes(size = avg_deaths, 
+                 color = region), 
+             alpha = 1) + 
+  
+  # white labels for WWI and WWII (inside the circles)
+  geom_text(
+    data = data |> filter(war_name %in% c("World War II", "World War I")), 
+    aes(label = paste0(war_name, "\n", 
+                       floor(war_deaths_low/1000000 * 10) / 10, "–",
+                       floor(war_deaths_high/1000000 * 10) / 10, "m deaths")),
+    size = 2.7,
+    color = "white",
+    fontface = "bold",
+    lineheight = 0.9
+  ) +
+ 
+  # labels outside the circles for other wars
+  geom_text(
+    data = interstate_labels,
+    aes(x = x_plot, y = label_y_plot, label = label_text),
+    size = 2.9,
+    color = "black",
+    lineheight = 0.9
+  ) +
+  
+  # "INTERSTATE WARS" panel title at top
+  annotate("text", 
+           x = 1800, 
+           y = 1.55, 
+           label = "INTERSTATE WARS", 
+           size = 5, 
+           fontface = "bold", 
+           hjust = 0) + # left-side
+  
+  scale_color_manual(values = region_colors,
+                     name = NULL, 
+                     breaks = names(region_colors)) +
+  
+  # circle area proportional to value
+  scale_size_area(max_size = 82,  
+                limits = c(min(data$avg_deaths), 
+                           max(data$avg_deaths)), 
+                guide = "none") +
+  
+  scale_x_continuous(limits = c(1800, 2015), # x-axis scale
+                     breaks = c(seq(1800, 2000, by = 20), 
+                                2011), # marks every 20 years (+ 2011)
+                     expand = c(0.01, 0),
+                     position = "bottom") +  # timeline at bottom of this panel
+  scale_y_continuous(limits = c(0.4, 1.6), # y-axis scale
+                     expand = c(0, 0)) +
+  
+  labs(title = "Combatant deaths in conventional wars, 1800–2011",
+       subtitle = "Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can\nmake the death tolls much larger.",
+       x = NULL, y = NULL) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    axis.text.x = element_text(size = 11),  # show x-axis numbers here (timeline)
+    axis.text.y = element_blank(), # no y-axis numbers
+    axis.ticks = element_blank(),
+    plot.title = element_text(size = 24, face = "bold", # font for title
+                            family = "Castoro",  
+                            margin = margin(b = 5)),
+  
+  plot.subtitle = element_text(size = 14, color = "gray30", # font for subtitle
+                               family = "Castoro",
+                               margin = margin(b = 15)),
+  plot.margin = margin(10, 10, 10, 10),
+    legend.position = "top",
+    legend.justification = "left",
+    legend.direction = "horizontal",
+    legend.text = element_text(size = 10)
+  ) +
+  
+  # region legend
+  guides(color = guide_legend(
+    override.aes = list(shape = 15, # show colors as squares
+                        size = 4.7), 
+    nrow = 1
+  ))
+
+graph_civil <- data |> 
+  filter(war_type == "CIVIL WARS") |>
+  ggplot(aes(x = x_plot, y = y_plot)) +
+  
+  geom_segment(
+    data = civil_labels |> 
+      left_join(data |> select(war_name, y_plot), by = "war_name"),
+    aes(x = x_plot, y = y_plot, xend = x_plot, yend = label_y_plot),
+    color = "gray40",
+    size = 0.3
+  ) +
+  
+  geom_point(aes(size = avg_deaths, color = region), alpha = 1) +
+  
+  geom_text(
+    data = civil_labels,
+    aes(x = x_plot, y = label_y_plot, label = label_text),
+    size = 2.9,
+    color = "black",
+    lineheight = 0.9
+  ) +
+  
+  annotate("text", x = 1800, y = 1.55, label = "CIVIL WARS", 
+           size = 5, fontface = "bold", hjust = 0) +
+  
+  scale_color_manual(values = region_colors, name = NULL, 
+                     breaks = names(region_colors)) +
+  scale_size_area(max_size = 80,  
+                limits = c(min(data$avg_deaths), max(data$avg_deaths)),
+                guide = "none") +
+  
+  scale_x_continuous(limits = c(1800, 2015), 
+                     breaks = c(seq(1800, 2000, by = 20), 2011),
+                     expand = c(0.01, 0)) +
+  scale_y_continuous(limits = c(0.4, 1.6), expand = c(0, 0)) +
+  
+  labs(x = NULL, y = NULL,  # remove axis labels
+       caption = "Note: Each circle is sized according to the war's lower death estimate. A conventional war is defined here as an armed conflict fought with differentiated militaries and clear frontlines that\ncaused at least 500 combatant deaths due to fighting over its duration. A civil war is a conflict between combatants that were previously part of the same state, with at least one group now\nseeking control or secession.\nSources: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.\nOurWorldInData.org — Research and data to make progress against the world's largest problems. Licensed under CC-BY by the authors Bastian Herre, Christian Schwinehart and Klara Auerbach.")  +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", size = 0.3),
+    axis.text.x = element_blank(),  # no timeline here
+    axis.text.y = element_blank(),
+    axis.ticks = element_blank(),
+    plot.caption = element_text(size = 9.7, color = "gray50", hjust = 0, margin = margin(t = 15)),
+    plot.margin = margin(10, 10, 10, 10),
+    legend.position = "none"
+  )
+
+# combine interstate wars + civil wars
+combined_graph <- graph_interstate / graph_civil + 
+  plot_layout(heights = c(7, 3))  
+
+combined_graph
+
+

+
+

Graph Improvement

+

Data Preparation

+
+
+
# calculate average deaths from low and high estimates
+data <- data |>
+  mutate(
+    avg_deaths = (war_deaths_low + war_deaths_high) / 2,
+    deaths_thousands = avg_deaths / 1000,
+    deaths_millions = avg_deaths / 1000000,
+    war_type = ifelse(civil_war == "Civil war", "Civil war", "Interstate war"),
+    
+    # recode regions
+    region = case_when(
+      region == "Americas" ~ "Americas",
+      region == "Asia" ~ "Asia",
+      region == "Europe" ~ "Europe",
+      region == "North Africa and Middle East" ~ "North Africa\n& Middle East",
+      region == "Sub-Saharan Africa" ~ "Sub-Saharan Africa",
+      TRUE ~ region
+    ),
+    
+    # fix incorrect naming
+    war_name = ifelse(war_name == "Third Sino-Japanese War", 
+                      "Second Sino-Japanese War", 
+                      war_name)
+  ) 
+
+
+

Create the Plot

+
+
+
# UPPER CHART: select top 10 deadliest wars per region (excluding World Wars)
+top_wars_by_region <- data |>
+  filter(!war_name %in% c("World War I", "World War II")) |>
+  
+  # remove other second sino-japanese war
+  filter(!(war_name == "Second Sino-Japanese War" & avg_deaths < 100000)) |>
+  group_by(region) |> # top 10 per region
+  arrange(desc(avg_deaths)) |>
+  slice_head(n = 10) |>
+  ungroup()
+
+war_type_colors <- c(
+  "Civil war" = "#d73027",
+  "Interstate war" = "#4575b4"
+)
+
+# plot: bar chart
+upper_chart <- ggplot(top_wars_by_region, 
+                 aes(x = deaths_thousands, 
+                     y = fct_reorder(war_name, avg_deaths),
+                     fill = war_type)) +
+  
+  geom_col(width = 0.7, alpha = 0.9) +
+  
+  # labels showing death counts
+  geom_text(
+    aes(label = ifelse(
+      deaths_thousands >= 1000,
+      paste0(round(deaths_millions, 1), "M"), # when millions "M"
+      paste0(round(deaths_thousands, 0), "k") # when thousands "k"
+    )), 
+    hjust = -0.1, # position slightly to the right of the bar's end
+    size = 2.3,
+    fontface = "bold",
+    color = "gray20"
+  ) +
+  
+  # each region gets its own panel (vertically)
+  facet_wrap(~region, scales = "free_y", ncol = 1, strip.position = "left") +
+  
+  scale_fill_manual(values = war_type_colors, name = "War Type") +
+  
+  scale_x_continuous(
+    breaks = seq(0, 2500, 500), # marks every 500k
+    labels = function(x) {
+      ifelse(x >= 1000, 
+             paste0(x / 1000, "M"),  # "M" if > = 1000k
+             paste0(x, "k"))  # keep as "k" otherwise
+    },
+    expand = expansion(mult = c(0, 0.15))
+  ) +
+  
+  labs(
+    title = "Deadliest Wars by Region, 1800–2011",
+    subtitle = "Top 10 conflicts with highest death toll per region (excluding World Wars)",
+    x = "Average Deaths",
+    y = NULL
+  ) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    strip.text.y.left = element_text(size = 14, face = "bold", color = "gray20", angle = 0, 
+                                      hjust = 0, margin = margin(l = 0, r = 5)),
+    strip.background = element_rect(fill = NA, color = NA),
+    strip.placement = "outside",
+    panel.spacing.y = unit(0.5, "lines"), # spacing between facets
+    axis.text.y = element_text(size = 10, face = "bold"),
+    axis.text.x = element_text(size = 9),
+    plot.title = element_text(size = 18, face = "bold", margin = margin(b = 5)),
+    plot.subtitle = element_text(size = 10, color = "gray30", margin = margin(b = 10)),
+    legend.position = "top",
+    legend.box = "horizontal",
+    legend.title = element_text(size = 9, face = "bold"),
+    legend.text = element_text(size = 8),
+    plot.margin = margin(10, 10, 5, 5)
+  )
+
+# BOTTOM CHART: calculate TOTAL deaths per region and war type
+regional_summary <- data |>
+  filter(!war_name %in% c("World War I", "World War II")) |>
+  group_by(region, war_type) |>
+  summarise(
+    total_deaths = sum(avg_deaths),
+    n_wars = n(),
+    .groups = "drop"
+  ) |>
+  mutate(
+    # civil war values are negative so they extend LEFT
+    deaths_millions = ifelse(war_type == "Civil war", 
+                             -total_deaths / 1000000,
+                             total_deaths / 1000000)
+  )
+
+# calculate total per region for ordering
+region_totals <- regional_summary |>
+  group_by(region) |>
+  summarise(total = sum(abs(deaths_millions)), .groups = "drop")
+
+bottom_chart <- ggplot(regional_summary, 
+                      aes(x = deaths_millions, 
+                          y = fct_reorder(region, abs(deaths_millions), .fun = sum),
+                          fill = war_type)) +
+  
+  geom_col(alpha = 0.9, width = 0.7) +
+  
+  # vertical line at center
+  geom_vline(xintercept = 0, color = "gray30", linewidth = 0.5) +
+  
+  # labels for civil wars (left side) 
+  geom_text(
+    data = regional_summary |> filter(war_type == "Civil war"),
+    aes(label = ifelse(
+      abs(deaths_millions) >= 1,
+      paste0(round(abs(deaths_millions), 1), "M"),
+      paste0(round(abs(deaths_millions) * 1000, 0), "k")
+    )),
+    hjust = 1.1, size = 3.5, fontface = "bold", color = "gray20"
+  ) +
+  
+  # labels for interstate wars (right side) 
+  geom_text(
+    data = regional_summary |> filter(war_type == "Interstate war"),
+    aes(label = ifelse(
+      deaths_millions >= 1,
+      paste0(round(deaths_millions, 1), "M"),
+      paste0(round(deaths_millions * 1000, 0), "k")
+    )), 
+    hjust = -0.1, size = 3.5, fontface = "bold", color = "gray20"
+  ) +
+  
+  scale_fill_manual(values = war_type_colors) +
+  
+  # custom x-axis to show absolute values
+  scale_x_continuous(
+    labels = function(x) paste0(abs(x), "M"), # show all values as positive
+    breaks = seq(-5, 5, 1),
+    limits = c(-5.5, 5.5)
+  ) +
+  
+  labs(
+    title = "Total War Deaths by Region and Type",
+    subtitle = "All conflicts 1800–2011 (excluding World Wars) | Civil wars (left) vs Interstate wars (right)",
+    x = "Total Deaths",
+    y = NULL
+  ) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor.x = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    axis.text.y = element_text(size = 12, face = "bold"),
+    axis.text.x = element_text(size = 10),
+    plot.title = element_text(size = 16, face = "bold", margin = margin(b = 5)),
+    plot.subtitle = element_text(size = 11, color = "gray30", margin = margin(b = 10)),
+    axis.title.x = element_text(size = 12, face = "bold"),
+    legend.position = "none",
+    plot.margin = margin(10, 10, 10, 10)
+  )
+
+# using patchwork to stack the two plots vertically
+final_plot <- upper_chart / bottom_chart +
+  plot_layout(heights = c(4, 1)) + # upper plot 4 times taller than bottom plot
+  plot_annotation(
+    caption = "Source: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.",
+    theme = theme(
+      plot.caption = element_text(size = 9, color = "gray50", hjust = 0, margin = margin(t = 10)),
+      plot.background = element_rect(fill = "#faf8f2", color = NA)
+    )
+  )
+
+final_plot
+
+

+
+
+ + +
+ +
+
+ + + + + +
+ + + + + + + diff --git a/_projects/2025/100566135/wars_by_deaths_mars.csv b/_projects/2025/100566135/wars_by_deaths_mars.csv new file mode 100644 index 00000000..82e7b6f5 --- /dev/null +++ b/_projects/2025/100566135/wars_by_deaths_mars.csv @@ -0,0 +1,253 @@ +war_name,war_deaths_low,war_deaths_high,civil_war,midpoint,region +World War II,21058660,30859974,Interstate war,1942,Cross-Regional +World War I,7107951,8935966,Interstate war,1916,Cross-Regional +Third Sino-Japanese War,1689000,3300000,Interstate war,1941,Asia +Chinese Civil War,1200000,2071610,Civil war,1947.5,Asia +Vietnam War,1062068,1217357,Interstate war,1969,Asia +Napoleonic Wars,570328,598225,Interstate war,1807.5,Europe +Korean War,543936,718099,Interstate war,1951.5,Asia +Russian Civil War,379483,858742,Civil war,1919.5,Europe +Iran-Iraq War,228220,578000,Interstate war,1984,North Africa and Middle East +Spanish Civil War,203839,288150,Civil war,1937.5,Europe +Warlord Era Wars,193400,280300,Civil war,1925,Asia +American Civil War,166040,229000,Civil war,1863,Americas +Crimean War,142559,172197,Interstate war,1854.5,Europe +Tigrean and Eritrean War,126000,315000,Civil war,1986.5,North Africa and Middle East +Thousand Days' War,100000,100000,Civil war,1900.5,Americas +Taiping Rebellion,95000,111000,Civil war,1857.5,Asia +Franco-Prussian War,90275,277200,Interstate war,1870.5,Europe +North Yemen Civil War,84000,100000,Civil war,1965.5,North Africa and Middle East +Second Balkan War,77800,87207,Interstate war,1912.5,Europe +Russo-Japanese War,75952,90300,Interstate war,1904.5,Asia +Second Sino-Japanese War,64770,74870,Interstate war,1931.5,Asia +Bosnian War,60677,89894,Civil war,1993.5,Europe +Angolan Civil War,59650,68135,Civil war,1988.5,Sub-Saharan Africa +Paraguayan War,55400,311400,Interstate war,1867,Americas +Rif War,54370,70000,Civil war,1923.5,North Africa and Middle East +Ethiopian-Eritrean War,53000,121500,Interstate war,1999,North Africa and Middle East +First Mahdi War,46349,56461,Civil war,1883,Sub-Saharan Africa +Durrani Empire-Sikh War,40400,56900,Interstate war,1818,Asia +Russo-Turkish War of 1828-29,40015,46372,Interstate war,1828.5,North Africa and Middle East +Ethiopian-Mahdi War,40000,75000,Interstate war,1887,North Africa and Middle East +Greco-Turkish War,38900,52000,Interstate war,1909.5,Europe +November Uprising,37900,37900,Civil war,1831,Europe +Russo-Turkish War,33000,39779,Interstate war,1808.5,Europe +Russo-Turkish War of 1877-78,32000,110000,Interstate war,1877.5,North Africa and Middle East +Second Maratha War,31868,39696,Interstate war,1804,Asia +Vientiane-Siam War,31000,31000,Interstate war,1827,Asia +First Sino-Vietnamese War,30000,56000,Interstate war,1979,Asia +Satsuma Rebellion,26300,26300,Civil war,1877,Asia +North Vietnam-South Vietnam War,26100,43500,Interstate war,1974.5,Asia +Vietnamese-Cambodian War,25000,73300,Interstate war,1977,Asia +Polish-Ukrainian War,25000,25000,Interstate war,1918.5,Europe +Chaco War,24000,50000,Interstate war,1933.5,Americas +Soviet-Polish War,21278,47000,Interstate war,1919.5,Europe +US-Afghan,21242,30442,Interstate war,1998,Asia +Persian Gulf War,20229,40237,Interstate war,1991,North Africa and Middle East +Asante-Asin-Fante-UKG War,20021,28021,Interstate war,1806.5,Sub-Saharan Africa +Franco-Mexican War,19400,28962,Interstate war,1864.5,Americas +Montenegrin-Ottoman War,19337,19337,Civil war,1857,Europe +First Anglo-Sikh War,19298,37341,Interstate war,1847,Asia +Second Italo-Abyssinian War,18897,54000,Interstate war,1935.5,North Africa and Middle East +Czech-Polish War,18000,25000,Interstate war,1919,Europe +First Serbian Uprising,17600,17600,Civil war,1808.5,Europe +Hungarian War of Independence,16708,27503,Civil war,1848.5,Europe +Montenegrin-Turkish War,16700,17000,Civil war,1877,Europe +Austro-Prussian War,16107,43800,Interstate war,1866,Europe +British-Mahdi War,15503,18509,Interstate war,1897.5,Sub-Saharan Africa +Battle of Khalkhin Gol,15271,32974,Interstate war,1939,Asia +Second Congo War,15200,17900,Civil war,2000,Sub-Saharan Africa +Nagorno-Karabakh War,14000,14000,Interstate war,1993,Europe +Indian Rebellion of 1857,13534,13534,Civil war,1857.5,Asia +Congo Arab War,13500,19000,Interstate war,1893,Sub-Saharan Africa +War of the Pacific,13383,38889,Interstate war,1881,Americas +Latvian War of Independence,13246,15200,Civil war,1919,Europe +Nien (Nian) Rebellion,13000,20000,Civil war,1860.5,Asia +Ogaden War,12986,12986,Civil war,1977.5,North Africa and Middle East +Laotian Civil War,12795,15091,Civil war,1968.5,Asia +First Italo-Abyssinian War,12200,18000,Interstate war,1895.5,North Africa and Middle East +Venezuelan War of Independence,12077,14877,Civil war,1815.5,Americas +Sri Lanka-Tamil War I,12038,13947,Civil war,1996,Asia +Austro-Sardinian War of 1859,12036,19601,Civil war,1859,Europe +Estonian War of Independence,11588,11600,Civil war,1919,Europe +Yom Kippur War,11546,18826,Interstate war,1973,North Africa and Middle East +Russo-Persian War,11500,12300,Interstate war,1808.5,North Africa and Middle East +East Turkestan Kashgar War,11150,11150,Interstate war,1933.5,Asia +Bangladesh War,11100,12800,Civil war,1971,Asia +Siamese-Vietnamese War II,11000,11000,Interstate war,1843,Asia +Lithuanian-Soviet War,10444,10444,Civil war,1918.5,Europe +Russia-Bukhara Khanate War,10380,23117,Interstate war,1866.5,Asia +Croatian War of Independence,10000,10678,Civil war,1993,Europe +Wahhabi War,9900,31700,Interstate war,1814.5,North Africa and Middle East +Italo-Turkish War,9621,16600,Interstate war,1911.5,North Africa and Middle East +Libyan Civil War,9400,9400,Civil war,2011,North Africa and Middle East +Tukolor-Bambara War of 1855,9300,9300,Interstate war,1855,Sub-Saharan Africa +Hungarian Adversaries War,9295,9295,Interstate war,1919,Europe +Greek War of Independence,9000,26000,Civil war,1825,Europe +Soviet-Georgia War,8526,8526,Interstate war,1921,Europe +Egypt-Abyssinian War,8479,11251,Interstate war,1875.5,North Africa and Middle East +British-Zulu War,8369,10500,Interstate war,1879,Sub-Saharan Africa +Bornu Empire-Rabah Empire War,8300,10600,Interstate war,1893,Sub-Saharan Africa +Tukulor-Bambara War of 1860,8250,8250,Interstate war,1860.5,Sub-Saharan Africa +Second Russo-Persian War,8030,20000,Interstate war,1827,North Africa and Middle East +Austro-Sardinian War of 1848,7950,9200,Interstate war,1848,Europe +Mexican-American War,7721,13733,Interstate war,1846.5,Americas +Sino-French (Tonkin) War,7222,14222,Interstate war,1884,Asia +Sino-Kashgarian War,7172,12172,Interstate war,1876.5,Asia +Japanese Invasion of Taiwan,7164,7700,Interstate war,1895,Asia +Hispano-Moroccan War,7152,10000,Interstate war,1859.5,North Africa and Middle East +Finnish Civil War,7100,11100,Civil war,1918,Europe +Chilean War of Independence,7000,7000,Civil war,1816.5,Americas +Sri Lanka-Tamil War II,6921,7547,Civil war,2008.5,Asia +Second Anglo-Afghan War,6850,8150,Interstate war,1879.5,Asia +India-Pakistan War of 1965,6800,9600,Interstate war,1965,Asia +East Turkestan Gulja Incident,6764,30810,Interstate war,1944.5,Asia +Lebanese War of 1982-84,6756,10095,Interstate war,1983,North Africa and Middle East +Sino-Jahriyya Order War,6590,8250,Interstate war,1871,Asia +First Anglo-Afghan War,6100,9200,Civil war,1840.5,Asia +Nigerian-Biafran War,6000,84000,Civil war,1968.5,Sub-Saharan Africa +Argentine-Brazilian War,6000,6000,Interstate war,1826.5,Americas +First Anglo-Burmese War,5600,24300,Interstate war,1825,Asia +Second Ethiopian War,5500,35000,Civil war,1871,North Africa and Middle East +Rwanda War 1994,5500,5500,Civil war,1994,Sub-Saharan Africa +Lebanese Civil War of 1975-76,5500,11500,Civil war,1975.5,North Africa and Middle East +Ashanti-British War,5458,6477,Interstate war,1824.5,Sub-Saharan Africa +1948 Palestine War,5184,10500,Interstate war,1948.5,North Africa and Middle East +Argentine War of Independence,5158,5158,Civil war,1814,Americas +Chilean Civil War,5100,6100,Civil war,1891,Americas +Anti-Monarchical War,5080,6080,Civil war,1915.5,Asia +Uruguayan Civil War,5028,8500,Civil war,1843.5,Americas +Turko Persian War,5000,5000,Interstate war,1821.5,North Africa and Middle East +Sino-Sikh War,5000,11000,Interstate war,1841.5,Asia +Six Day War,4985,22483,Interstate war,1967,North Africa and Middle East +Khoja Rebellion I (East Turkestan),4800,4800,Civil war,1828,Asia +Peruvian War of Independence,4800,4800,Civil war,1822,Americas +Argentine Unitarian-Federalist War,4500,5500,Civil war,1829.5,Americas +First Opium War,4369,20364,Interstate war,1840.5,Asia +Russia-Khokand Khanate War,4214,6100,Interstate war,1875.5,Asia +Gwalior War,4141,4997,Interstate war,1843,Asia +Siege of Bharatpur,4106,8400,Interstate war,1825.5,Asia +Anglo-Baluch War,4039,6475,Interstate war,1843,Asia +Boshin War,4000,4000,Civil war,1868.5,Asia +Kashgaria-Urumchi Dungan War,4000,7000,Interstate war,1871,Asia +Farroupilha Revolution,3893,5843,Civil war,1840,Americas +Siamese-Vietnamese War,3880,3880,Interstate war,1833.5,Asia +US-Iraq War,3765,13615,Interstate war,2003,North Africa and Middle East +Russia-Khokandian War,3747,8777,Interstate war,1864.5,Asia +War of the Golden Stool,3692,5000,Interstate war,1900,Sub-Saharan Africa +Second Schleswig-Holstein War,3600,5500,Interstate war,1864,Europe +First Schleswig-Holstein War,3552,6000,Interstate war,1849,Europe +Franco-Tukulor War,3530,3530,Interstate war,1858,Sub-Saharan Africa +Ottoman Conquest of Arabia,3444,10556,Interstate war,1871,North Africa and Middle East +French-Algerian War,3400,3600,Interstate war,1830,North Africa and Middle East +Second Opium War,3300,3300,Interstate war,1858,Asia +Anglo-Ashanti War,3195,4196,Interstate war,1873.5,Sub-Saharan Africa +Sino-Soviet War,3143,3143,Interstate war,1929,Asia +War of 1812,3140,5260,Interstate war,1813.5,Americas +Boxer Rebellion,3136,3549,Interstate war,1900.5,Asia +Second Anglo-Boer War,3129,3863,Interstate war,1899.5,Sub-Saharan Africa +Sino-Kuchean Muslim War,3100,3300,Interstate war,1864.5,Asia +Second Dominican War,3030,5600,Interstate war,1846.5,Americas +Afghan-Sikh War,3000,17000,Interstate war,1837,Asia +Second Turko-Egyptian War,3000,3100,Civil war,1839.5,North Africa and Middle East +War of the Confederation,2950,3000,Interstate war,1838,Americas +First Sino-Japanese War,2864,15000,Interstate war,1894.5,Asia +Russo-Turkomen War,2708,10575,Interstate war,1879.5,Asia +Toyota War,2700,10000,Interstate war,1987,North Africa and Middle East +First Central American War,2600,6000,Interstate war,1876,Americas +Franco-Dahomean War,2597,5044,Interstate war,1891,Sub-Saharan Africa +British Expedition to Tibet,2540,3000,Interstate war,1904,Asia +Third Maratha War,2522,6449,Interstate war,1817.5,Asia +War of the Roman Republic,2500,2500,Civil war,1849,Europe +Melilla War,2500,2500,Interstate war,1893.5,North Africa and Middle East +India-Pakistan War of 1947,2500,4000,Interstate war,1948,Asia +British-Sokoto Caliphate War,2393,4469,Interstate war,1900,Sub-Saharan Africa +First Turko-Egyptian War,2364,7862,Civil war,1832,North Africa and Middle East +Second Spanish-Moroccan War,2300,10000,Interstate war,1909,North Africa and Middle East +First Egba-Dahomey War,2300,3300,Interstate war,1851,Sub-Saharan Africa +Anglo-Egyptian War,2260,2329,Interstate war,1882,North Africa and Middle East +Sino-Indian War,2105,2423,Interstate war,1962,Asia +Austro-Venetian War,2100,2100,Civil war,1849,Europe +Venezuelan Civil War,2100,2100,Civil war,1899,Americas +Saudi-Yemeni War,2100,2100,Interstate war,1934,North Africa and Middle East +Afghan-Persian War,2100,2100,Interstate war,1837,Asia +Tibet-Nepalese War,2092,2420,Interstate war,1855.5,Asia +Franco-Turkish War,2083,5379,Interstate war,1920,North Africa and Middle East +Second Chinese Revolution,2050,4300,Civil war,1913,Asia +Second Egba-Dahomey War,2040,7050,Interstate war,1864,Sub-Saharan Africa +Mahdi-Egyptian War,2039,3148,Interstate war,1889,North Africa and Middle East +Brazilian War of Independence,2000,2000,Civil war,1822.5,Americas +Ninth Cape Frontier War,1950,3880,Interstate war,1877.5,Sub-Saharan Africa +Second Taiwan Strait Crisis,1860,2667,Interstate war,1956,Asia +First Sino-Tibet War,1800,6000,Interstate war,1912.5,Asia +Xinhai Revolution,1800,2800,Civil war,1911,Asia +Fourth Dominican War,1795,2800,Interstate war,1855.5,Americas +Two Sicilies Insurrection,1785,6000,Interstate war,1860,Europe +War of Attrition,1744,6424,Interstate war,1969.5,North Africa and Middle East +Third and Fourth Central American War,1700,3100,Interstate war,1906.5,Americas +La Plata War,1700,2800,Interstate war,1851.5,Americas +Uganda-Tanzania War,1696,1696,Interstate war,1978.5,Sub-Saharan Africa +Central American National War,1550,2450,Interstate war,1856.5,Americas +Ecuadorian War of Independence,1528,1528,Civil war,1821.5,Americas +Kosovo War,1502,1502,Civil war,1999,Europe +Turko-Cypriot War,1500,5800,Civil war,1974,Europe +Second Sino-Tibet War,1500,1500,Interstate war,1918,Asia +Texas Revolution,1493,2378,Civil war,1835.5,Americas +Central American War,1456,2231,Interstate war,1863,Americas +Neapolitan War,1426,1426,Interstate war,1815,Europe +Gurkha War,1400,3830,Interstate war,1815,Asia +Iraq-Kuwait War,1400,1400,Interstate war,1990,North Africa and Middle East +Tukolor-Tamba War,1400,1400,Interstate war,1852.5,Sub-Saharan Africa +Hejaz War,1350,1650,Interstate war,1922,North Africa and Middle East +Aceh War,1315,1351,Civil war,1873.5,Asia +Bolivia-Peru War,1300,1300,Interstate war,1841,Americas +Battle of Lake Khasan,1243,1243,Interstate war,1938,Asia +Operation Polo,1201,1242,Interstate war,1948,Asia +Anglo-Persian War,1200,2000,Interstate war,1856.5,North Africa and Middle East +Black September War of 1970,1200,1350,Civil war,1970,North Africa and Middle East +Suez Crisis,1198,3216,Interstate war,1956,North Africa and Middle East +Third Anglo-Afghan War,1177,1236,Interstate war,1919,Asia +Mahdist-Italian War,1130,3142,Interstate war,1893.5,North Africa and Middle East +Kargil Conflict,1107,3527,Interstate war,1999,Asia +Russo-Chinese War,1080,4000,Interstate war,1900,Asia +Franco-Mandingo War V,1051,1100,Interstate war,1891.5,Sub-Saharan Africa +Franco-Rabah Empire War,1025,1825,Interstate war,1900,Sub-Saharan Africa +Falklands War,1001,1255,Interstate war,1982,Americas +Yemen Border War II,1000,1000,Interstate war,1979,North Africa and Middle East +Franco-Moroccan War,1000,1390,Interstate war,1844,North Africa and Middle East +Franco-Spanish War,1000,1000,Interstate war,1823,Europe +Wadai War,847,3562,Interstate war,1909.5,Sub-Saharan Africa +Serbo-Bulgarian War,842,9685,Interstate war,1885.5,Europe +Turkish-Armenian War,755,1473,Interstate war,1920,North Africa and Middle East +Peruvian-Ecuadorian War,700,800,Interstate war,1941,Americas +Second Sino-Vietnamese War,700,1700,Interstate war,1987,Asia +Gran Colombia-Peru War,660,4500,Interstate war,1828.5,Americas +Waziristan Campaign,659,3550,Interstate war,1919.5,Asia +Dniestrian Independence War,648,1262,Civil war,1992,Europe +War of Dogali,631,1368,Interstate war,1887,North Africa and Middle East +Israel-Hezbollah War,619,721,Interstate war,2006,North Africa and Middle East +Portugal-Gaza Nguni War,610,9950,Interstate war,1895,Sub-Saharan Africa +Fifth Cape Frontier War,580,2090,Interstate war,1818.5,Sub-Saharan Africa +Spanish-American War,580,1180,Interstate war,1898,Asia +First Matabele War,578,2091,Interstate war,1893.5,Sub-Saharan Africa +France-Tukolor Empire War,524,524,Interstate war,1893,Sub-Saharan Africa +British Abyssinian Expedition,501,802,Interstate war,1868,North Africa and Middle East +Bombardment of Algiers,442,2142,Interstate war,1816,North Africa and Middle East +Georgian-Ossetian Conflict,415,2035,Civil war,1991.5,Europe +Second Central American War,400,2200,Interstate war,1885,Americas +Tripolitan War,396,977,Interstate war,1803,North Africa and Middle East +Second Franco-Hova War,380,485,Interstate war,1895,Sub-Saharan Africa +Yemen Civil War,362,2640,Civil war,1994,North Africa and Middle East +Azeri-Armenian War,350,700,Interstate war,1920,Asia +Sino-Khokandian War,332,332,Interstate war,1865,Asia +Franco-Mandingo War VIII,322,1022,Interstate war,1898,Sub-Saharan Africa +War of the Oranges,314,382,Interstate war,1801,Europe +Seventh Cape Frontier War,310,3000,Interstate war,1846.5,Sub-Saharan Africa +Russo-Khivan War,246,266,Interstate war,1873,Asia +Georgia-Russia War,225,244,Civil war,2008,Europe +Anglo-Turkish War,213,213,Interstate war,1808,North Africa and Middle East +Football War,206,368,Interstate war,1969,Americas +Papal States War,150,1000,Interstate war,1860,Europe +Ecuadorian-Colombian War,148,148,Interstate war,1863,Americas +Eighth Cape Frontier War,114,3700,Interstate war,1851,Sub-Saharan Africa +Polish-Lithuanian War,30,30,Interstate war,1920,Europe diff --git a/projects/2025/100566135/100566135_files/figure-html5/plot display 2-1.png b/projects/2025/100566135/100566135_files/figure-html5/plot display 2-1.png new file mode 100644 index 00000000..25b6c588 Binary files /dev/null and b/projects/2025/100566135/100566135_files/figure-html5/plot display 2-1.png differ diff --git a/projects/2025/100566135/100566135_files/figure-html5/plot display-1.png b/projects/2025/100566135/100566135_files/figure-html5/plot display-1.png new file mode 100644 index 00000000..6289d7a4 Binary files /dev/null and b/projects/2025/100566135/100566135_files/figure-html5/plot display-1.png differ diff --git a/projects/2025/100566135/index.html b/projects/2025/100566135/index.html new file mode 100644 index 00000000..8ba655db --- /dev/null +++ b/projects/2025/100566135/index.html @@ -0,0 +1,4321 @@ + + + + + + + + + + + + + + + + + + + + +Data Visualization | MSc CSS: Combatant deaths in conventional wars, 1800-2011 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Combatant deaths in conventional wars, 1800-2011

+ + +
+ 2025 +
+ +

Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can make the death tolls much larger.

+
+ +
+ + Adela Solís + +
2025-12-15 +
+ +
+
+ +
+

Graph Replication

+

Loading Libraries and Data

+
+
+
library(tidyverse)
+library(scales)
+library(patchwork)
+library(showtext)
+
+data <- read.csv("wars_by_deaths_mars.csv")
+
+
+

Data Preparation

+
+
+
set.seed(123)
+data <- data |> 
+  mutate( # calculating average deaths for sizing
+    avg_deaths = (war_deaths_low + war_deaths_high) / 2, 
+    deaths_millions = avg_deaths / 1000000,
+    war_type = ifelse(civil_war == "Civil war", "CIVIL WARS", "INTERSTATE WARS"),
+    war_type = factor(war_type, levels = c("INTERSTATE WARS", "CIVIL WARS")),
+    
+    y_manual = case_when( # here i manually assign a 'y_manual' value to each war to ensure exact spread, each war gets a specific y-coordinate (0-10 scale)
+  
+  # INTERSTATE WARS (positioned around y = 4.0)
+  war_name == "Second Maratha War" ~ 4.17,   
+  war_name == "Napoleonic Wars" ~ 4.7,       
+  war_name == "Anglo-Turkish War" ~ 3.95,    
+  war_name == "Russo-Turkish War" ~ 3.67,    
+  war_name == "Russo-Persian War" ~ 4.17,    
+ 
+  war_name == "War of 1812" ~ 4.0,           
+  war_name == "Wahhabi War" ~ 4.3,           
+  war_name == "Neapolitan War" ~ 3.87,       
+  war_name == "Gurkha War" ~ 4.1,            
+  war_name == "Bombardment of Algiers" ~ 4.0, 
+  war_name == "Third Maratha War" ~ 4.15,    
+  war_name == "Durrani Empire-Sikh War" ~ 3.7, 
+  war_name == "Fifth Cape Frontier War" ~ 4.0, 
+  
+  war_name == "Turko Persian War" ~ 4.0,     
+  war_name == "Ashanti-British War" ~ 4.15,  
+  war_name == "First Anglo-Burmese War" ~ 3.78, 
+  war_name == "Siege of Bharatpur" ~ 4.0,    
+  war_name == "Argentine-Brazilian War" ~ 4.15, 
+  war_name == "Vientiane-Siam War" ~ 3.6,    
+  war_name == "Second Russo-Persian War" ~ 3.9, 
+  war_name == "Russo-Turkish War of 1828-29" ~ 4.3, 
+  war_name == "Gran Colombia-Peru War" ~ 4.05, 
+  war_name == "French-Algerian War" ~ 4.0,   
+  
+  war_name == "Siamese-Vietnamese War" ~ 4.0, 
+  war_name == "Afghan-Sikh War" ~ 4.0,       
+  war_name == "Afghan-Persian War" ~ 3.78,   
+  war_name == "War of the Confederation" ~ 4.17, 
+  war_name == "First Opium War" ~ 4.23,      
+  war_name == "Bolivia-Peru War" ~ 4.0,       
+  war_name == "Sino-Sikh War" ~ 3.78,        
+  war_name == "Siamese-Vietnamese War II" ~ 4.35,  
+  war_name == "Gwalior War" ~ 4.1,           
+  war_name == "Anglo-Baluch War" ~ 3.8,      
+  war_name == "Franco-Moroccan War" ~ 4.0,   
+  
+  war_name == "Mexican-American War" ~ 3.78, 
+  war_name == "Second Dominican War" ~ 4.23,  
+  war_name == "Seventh Cape Frontier War" ~ 4.0, 
+  war_name == "First Anglo-Sikh War" ~ 3.53, 
+  war_name == "Austro-Sardinian War of 1848" ~ 4.33,  
+  war_name == "First Schleswig-Holstein War" ~ 4.0, 
+  war_name == "First Egba-Dahomey War" ~ 3.8, 
+  war_name == "Eighth Cape Frontier War" ~ 4.0,  
+  war_name == "La Plata War" ~ 4.23,      
+  war_name == "Tukolor-Tamba War" ~ 4.1, 
+  war_name == "Crimean War" ~ 4.6,         
+  war_name == "Tukolor-Bambara War of 1855" ~ 4.2, 
+  war_name == "Tibet-Nepalese War" ~ 3.75,   
+  war_name == "Fourth Dominican War" ~ 3.95, 
+  war_name == "Central American National War" ~ 4.25,
+  war_name == "Anglo-Persian War" ~ 4.03, 
+  war_name == "Franco-Tukulor War" ~ 4.23,  
+  war_name == "Second Opium War" ~ 4.03,     
+  war_name == "Hispano-Moroccan War" ~ 3.78, 
+  war_name == "Two Sicilies Insurrection" ~ 4.2, 
+  war_name == "Papal States War" ~ 4.0,      
+  war_name == "Tukulor-Bambara War of 1860" ~ 4.43, 
+  
+  war_name == "Central American War" ~ 4.2,  
+  war_name == "Ecuadorian-Colombian War" ~ 4.0, 
+  war_name == "Second Schleswig-Holstein War" ~ 3.67, 
+  war_name == "Second Egba-Dahomey War" ~ 4.04, 
+  war_name == "Franco-Mexican War" ~ 3.4,    
+  war_name == "Russia-Khokandian War" ~ 3.87, 
+  war_name == "Sino-Kuchean Muslim War" ~ 4.23, 
+  war_name == "Sino-Khokandian War" ~ 4.06, 
+  war_name == "Russia-Bukhara Khanate War" ~ 3.77, 
+  war_name == "Austro-Prussian War" ~ 3.5,   
+  war_name == "Paraguayan War" ~ 4.2,        
+  war_name == "British Abyssinian Expedition" ~ 3.8, 
+  war_name == "Franco-Prussian War" ~ 4.5, 
+  war_name == "Sino-Jahriyya Order War" ~ 3.55, 
+  war_name == "Ottoman Conquest of Arabia" ~ 3.8, 
+  war_name == "Kashgaria-Urumchi Dungan War" ~ 4.05, 
+  
+  war_name == "Anglo-Ashanti War" ~ 4.17,    
+  war_name == "Egypt-Abyssinian War" ~ 3.55, 
+  war_name == "Russia-Khokand Khanate War" ~ 4.2, 
+  war_name == "First Central American War" ~ 4.0, 
+  war_name == "Sino-Kashgarian War" ~ 3.8,   
+  war_name == "Russo-Turkish War of 1877-78" ~ 4.3, 
+  war_name == "Ninth Cape Frontier War" ~ 4.0, 
+  war_name == "British-Zulu War" ~ 3.77,     
+  war_name == "Second Anglo-Afghan War" ~ 4.23, 
+  war_name == "Russo-Turkomen War" ~ 4.0,   
+  
+  war_name == "War of the Pacific" ~ 3.77,
+  war_name == "Anglo-Egyptian War" ~ 4.0,
+  war_name == "Sino-French (Tonkin) War" ~ 4.15,
+  war_name == "Second Central American War" ~ 4.0,
+  war_name == "Serbo-Bulgarian War" ~ 4.2,
+  war_name == "Ethiopian-Mahdi War" ~ 3.73,
+  war_name == "War of Dogali" ~ 4.0,
+  war_name == "Mahdi-Egyptian War" ~ 4.0,
+
+  war_name == "Franco-Dahomean War" ~ 4.1,
+  war_name == "Franco-Mandingo War V" ~ 4.0,
+  war_name == "Congo Arab War" ~ 4.37,
+  war_name == "Bornu Empire-Rabah Empire War" ~ 3.75,
+  war_name == "France-Tukolor Empire War" ~ 4.05,
+  war_name == "Melilla War" ~ 4.2,
+  war_name == "Mahdist-Italian War" ~ 3.9,
+  war_name == "First Matabele War" ~ 4.1,
+  war_name == "First Sino-Japanese War" ~ 3.9,
+  war_name == "Japanese Invasion of Taiwan" ~ 4.3,
+  war_name == "Portugal-Gaza Nguni War" ~ 4.1,
+  war_name == "Second Franco-Hova War" ~ 4.01,
+  war_name == "First Italo-Abyssinian War" ~ 3.73,
+  war_name == "British-Mahdi War" ~ 3.85,
+  war_name == "Spanish-American War" ~ 4.15,
+  war_name == "Franco-Mandingo War VIII" ~ 4.07,
+  war_name == "Second Anglo-Boer War" ~ 4.2,
+  war_name == "War of the Golden Stool" ~ 4.27,
+  war_name == "British-Sokoto Caliphate War" ~ 3.8,
+  war_name == "Franco-Rabah Empire War" ~ 4.0,
+  
+  war_name == "Boxer Rebellion" ~ 4.05,
+  war_name == "Russo-Japanese War" ~ 4.3,
+  war_name == "Third and Fourth Central American War" ~ 4.05,
+  war_name == "Second Spanish-Moroccan War" ~ 4.15,
+  war_name == "Greco-Turkish War" ~ 3.8,
+  war_name == "Wadai War" ~ 4.0,
+  war_name == "Italo-Turkish War" ~ 4.15,
+  war_name == "Second Balkan War" ~ 3.7,
+  war_name == "First Sino-Tibet War" ~ 4.0,
+  
+  war_name == "World War I" ~ 1.65,           
+  war_name == "Second Sino-Tibet War" ~ 4.0,
+  war_name == "Polish-Ukrainian War" ~ 4.5,
+  war_name == "Czech-Polish War" ~ 4.3,
+  war_name == "Hungarian Adversaries War" ~ 3.75,
+  war_name == "Third Anglo-Afghan War" ~ 4.1,
+  war_name == "Soviet-Polish War" ~ 3.5,
+  war_name == "Waziristan Campaign" ~ 4.0,
+  war_name == "Franco-Turkish War" ~ 4.2,
+  war_name == "Turkish-Armenian War" ~ 3.8,
+  war_name == "Azeri-Armenian War" ~ 4.1,
+  war_name == "Polish-Lithuanian War" ~ 4.0,
+  war_name == "Soviet-Georgia War" ~ 3.7,
+  war_name == "Hejaz War" ~ 4.0,
+  
+  war_name == "Second Sino-Japanese War" ~ 4.4, 
+  war_name == "Third Sino-Japanese War" ~ 2.85, 
+  war_name == "World War II" ~ 7.9,         
+  war_name == "Sino-Soviet War" ~ 4.0, 
+  war_name == "Chaco War" ~ 3.7,
+  war_name == "East Turkestan Kashgar War" ~ 4.25, 
+  war_name == "Saudi-Yemeni War" ~ 4.01, 
+  war_name == "Second Italo-Abyssinian War" ~ 3.9,
+  war_name == "Battle of Lake Khasan" ~ 4.01, 
+  war_name == "Battle of Khalkhin Gol" ~ 4.2,
+  war_name == "Peruvian-Ecuadorian War" ~ 4.0, 
+  war_name == "East Turkestan Gulja Incident" ~ 4.0, 
+  war_name == "India-Pakistan War of 1947" ~ 4.0, 
+  war_name == "Operation Polo" ~ 4.2,
+  war_name == "1948 Palestine War" ~ 3.8,
+  war_name == "Korean War" ~ 4.6,            
+  war_name == "Suez Crisis" ~ 3.95,          
+  war_name == "Second Taiwan Strait Crisis" ~ 4.09,
+  
+  war_name == "Sino-Indian War" ~ 3.95,
+  war_name == "India-Pakistan War of 1965" ~ 3.95,
+  war_name == "Six Day War" ~ 3.95,
+  war_name == "Vietnam War" ~ 3.22,
+  war_name == "Football War" ~ 3.95,
+  war_name == "War of Attrition" ~ 4.09, 
+  war_name == "Yom Kippur War" ~ 4.0,       
+  war_name == "North Vietnam-South Vietnam War" ~ 4.25,   
+  war_name == "Vietnamese-Cambodian War" ~ 4.0,       
+  war_name == "Uganda-Tanzania War" ~ 4.09, 
+  war_name == "First Sino-Vietnamese War" ~ 3.8,
+  war_name == "Yemen Border War II" ~ 4.0,    
+  war_name == "Falklands War" ~ 4.0,    
+  war_name == "Lebanese War of 1982-84" ~ 4.09,
+  war_name == "Iran-Iraq War" ~ 3.6,        
+  war_name == "Toyota War" ~ 4.1,
+  war_name == "Second Sino-Vietnamese War" ~ 4.0,  
+  war_name == "Iraq-Kuwait War" ~ 4.0,  
+  war_name == "Persian Gulf War" ~ 4.25,  
+  war_name == "Nagorno-Karabakh War" ~ 4.0, 
+  war_name == "US-Afghan" ~ 4.25,  
+  war_name == "Ethiopian-Eritrean War" ~ 3.7, 
+  war_name == "Kargil Conflict" ~ 4.0,
+  war_name == "US-Iraq War" ~ 4.0,
+  war_name == "Israel-Hezbollah War" ~ 4.0,
+  
+  # CIVIL WARS (positioned around y = 5.0)
+  war_name == "Argentine War of Independence" ~ 5.0,
+  war_name == "Venezuelan War of Independence" ~ 5.3,
+  war_name == "Chilean War of Independence" ~ 5.0,
+  war_name == "Ecuadorian War of Independence" ~ 5.0,
+  war_name == "Peruvian War of Independence" ~ 4.8,
+  war_name == "Brazilian War of Independence" ~ 5.2,
+  war_name == "November Uprising" ~ 5.3,
+  war_name == "Second Turko-Egyptian War" ~ 5.0,
+  war_name == "Farroupilha Revolution" ~ 5.3,
+  war_name == "First Anglo-Afghan War" ~ 4.8,
+  war_name == "Hungarian War of Independence" ~ 4.52,
+  war_name == "War of the Roman Republic" ~ 5.3,
+  war_name == "Montenegrin-Ottoman War" ~ 4.86,
+  war_name == "Indian Rebellion of 1857" ~ 5.3,
+  war_name == "Austro-Sardinian War of 1859" ~ 4.9,
+  war_name == "Nien (Nian) Rebellion" ~ 5.2,
+  war_name == "Taiping Rebellion" ~ 4.1,
+  war_name == "American Civil War" ~ 4.7,
+  war_name == "Boshin War" ~ 4.9,
+  war_name == "Satsuma Rebellion" ~ 5.47,
+  war_name == "Thousand Days' War" ~ 5.45,
+  war_name == "Xinhai Revolution" ~ 5.0,
+  war_name == "Finnish Civil War" ~ 5.0,
+  war_name == "Lithuanian-Soviet War" ~ 5.35,
+  war_name == "Latvian War of Independence" ~ 4.73,
+  war_name == "Estonian War of Independence" ~ 4.35,
+  war_name == "Russian Civil War" ~ 6.85,
+  war_name == "Warlord Era Wars" ~ 6.15,
+  war_name == "Spanish Civil War" ~ 5.0,
+  war_name == "Chinese Civil War" ~ 5.0,
+  war_name == "Nigerian-Biafran War" ~ 4.9,
+  war_name == "Black September War of 1970" ~ 4.9,
+  war_name == "Bangladesh War" ~ 5.15,
+  war_name == "Ogaden War" ~ 4.95,
+  war_name == "Angolan Civil War" ~ 5.85,
+  war_name == "Dniestrian Independence War" ~ 5.27,
+  war_name == "Bosnian War" ~ 4.4,
+  war_name == "Rwanda War 1994" ~ 5.5,
+  war_name == "Yemen Civil War" ~ 5.15,
+  war_name == "Second Congo War" ~ 5.3,
+  war_name == "Sri Lanka-Tamil War II" ~ 5.37,
+
+  war_type == "INTERSTATE WARS" ~ runif(n(), 3.85, 4.15), # default y-position for interstate wars
+  war_type == "CIVIL WARS" ~ runif(n(), 4.85, 5.15), # default y-position for civil wars
+  TRUE ~ 5.0
+),
+
+
+    y_plot = scales::rescale(y_manual, to = c(0.5, 1.5), from = c(0, 10)), # rescale: convert 0-10 scale to 0.5-1.5 for plotting
+    x_plot = midpoint # x-coordinate is the midpoint of war years (variable from dataset)
+)
+
+data <- data |>
+  mutate(
+    region = recode(region, 
+                    "Cross-Regional" = "Multiple regions",
+                    "North Africa and Middle East" = "North Africa & Middle East") 
+  )
+
+max_deaths <- max(data$avg_deaths)
+min_deaths <- min(data$avg_deaths)
+
+
+

Details for Visualization (Colors, Fonts and Labels)

+
+
+
region_colors <- c(
+  "Multiple regions" = "#AF1B45",
+  "Americas" = "#E46E5A",
+  "Asia" = "#58AB8B",
+  "Europe" = "#FAAF3B",
+  "North Africa & Middle East" = "#79B6F2",
+  "Sub-Saharan Africa" = "#4C6A9B"
+)
+
+font_add(family = "Castoro", 
+         regular = "/Users/adelasolisolis/Data Visualization/dataviz/Castoro/Castoro-Regular.ttf")  # custom font from google fonts
+
+showtext_auto()
+showtext_opts(dpi = 96) 
+
+
+# manual positioning for labels (INTERSTATE)
+interstate_labels <- tribble(
+  ~war_name, ~label_y, ~formatted_name,
+  "Napoleonic Wars", 5.7, "Napoleonic Wars",
+  "Crimean War", 5.5, "Crimean War",
+  "Korean War", 1.5, "Korean War",
+  "Suez Crisis", 3.0, "Suez Crisis",
+  "Vietnam War", 1.0, "Vietnam War",
+  "Yom Kippur War", 5.3, "Yom Kippur War",
+  "Iran-Iraq War", 2.0, "Iran-Iraq War",
+  "Persian Gulf War", 5.8, "Persian Gulf War",
+  "Ethiopian-Eritrean War", 1.5, "Ethiopian-\nEritrean War",  # line break 
+  "Third Sino-Japanese War", 0.2, "Second Sino-\nJapanese War"  # renamed (error in dataset) + line break
+) |>
+  left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # add death range estimate
+            by = "war_name") |>
+  mutate(
+    # use formatted_name in label
+    label_text = ifelse(
+      war_name == "Third Sino-Japanese War",
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000000 * 10) / 10, "–", 
+             floor(war_deaths_high/1000000 * 10) / 10, "m"), # death range in millions
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000), "–", 
+             floor(war_deaths_high/1000), "k")  # death range in thousands
+    ),
+    label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling
+  )
+
+# manual positioning for labels (CIVIL)
+civil_labels <- tribble(
+  ~war_name, ~label_y, ~formatted_name,
+  "Venezuelan War of Independence", 7.2, "Venezuelan War\nof Independence",  
+  "American Civil War", 2.6, "American Civil War",
+  "Russian Civil War", 9.2, "Russian Civil War",
+  "Warlord Era Wars", 3.5, "Warlord Era Wars",
+  "Spanish Civil War", 6.6, "Spanish Civil War",
+  "Chinese Civil War", 1.8, "Chinese Civil War",
+  "Angolan Civil War", 7.6, "Angolan Civil War",
+  "Bosnian War", 1.6, "Bosnian War"
+) |>
+  left_join(data |> select(war_name, x_plot, war_deaths_low, war_deaths_high), # also add death estimate range
+            by = "war_name") |>
+  mutate(
+    label_text = ifelse(
+      war_name == "Chinese Civil War",
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000000 * 10) / 10, "–", 
+             floor(war_deaths_high/1000000 * 10) / 10, "m"),
+      paste0(formatted_name, "\n", 
+             floor(war_deaths_low/1000), "–", 
+             floor(war_deaths_high/1000), "k")
+    ),
+    label_y_plot = scales::rescale(label_y, to = c(0.5, 1.5), from = c(0, 10)) # rescaling
+  )
+
+
+

Create the Plot (Faceting, Color Scale, Size Scale, X / Y-Axis Scale, Labels and Theme Details)

+
+
+
graph_interstate <- data |> 
+  filter(war_type == "INTERSTATE WARS") |>
+  ggplot(aes(x = x_plot, y = y_plot)) +
+   
+  # lines connecting circles to external labels (added first so that they appear behind the circles)
+  geom_segment(
+    data = interstate_labels |> 
+      left_join(data |>
+                  select(war_name, y_plot), by = "war_name"),
+    aes(x = x_plot, 
+        y = y_plot, 
+        xend = x_plot, 
+        yend = label_y_plot),
+    color = "gray40",
+    linewidth = 0.3
+  ) +
+  
+  # plot the circles that represent wars
+  geom_point(aes(size = avg_deaths, 
+                 color = region), 
+             alpha = 1) + 
+  
+  # white labels for WWI and WWII (inside the circles)
+  geom_text(
+    data = data |> filter(war_name %in% c("World War II", "World War I")), 
+    aes(label = paste0(war_name, "\n", 
+                       floor(war_deaths_low/1000000 * 10) / 10, "–",
+                       floor(war_deaths_high/1000000 * 10) / 10, "m deaths")),
+    size = 2.7,
+    color = "white",
+    fontface = "bold",
+    lineheight = 0.9
+  ) +
+ 
+  # labels outside the circles for other wars
+  geom_text(
+    data = interstate_labels,
+    aes(x = x_plot, y = label_y_plot, label = label_text),
+    size = 2.9,
+    color = "black",
+    lineheight = 0.9
+  ) +
+  
+  # "INTERSTATE WARS" panel title at top
+  annotate("text", 
+           x = 1800, 
+           y = 1.55, 
+           label = "INTERSTATE WARS", 
+           size = 5, 
+           fontface = "bold", 
+           hjust = 0) + # left-side
+  
+  scale_color_manual(values = region_colors,
+                     name = NULL, 
+                     breaks = names(region_colors)) +
+  
+  # circle area proportional to value
+  scale_size_area(max_size = 82,  
+                limits = c(min(data$avg_deaths), 
+                           max(data$avg_deaths)), 
+                guide = "none") +
+  
+  scale_x_continuous(limits = c(1800, 2015), # x-axis scale
+                     breaks = c(seq(1800, 2000, by = 20), 
+                                2011), # marks every 20 years (+ 2011)
+                     expand = c(0.01, 0),
+                     position = "bottom") +  # timeline at bottom of this panel
+  scale_y_continuous(limits = c(0.4, 1.6), # y-axis scale
+                     expand = c(0, 0)) +
+  
+  labs(title = "Combatant deaths in conventional wars, 1800–2011",
+       subtitle = "Number of combatants who died due to fighting in interstate and civil wars. This excludes civilian deaths, which can\nmake the death tolls much larger.",
+       x = NULL, y = NULL) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    axis.text.x = element_text(size = 11),  # show x-axis numbers here (timeline)
+    axis.text.y = element_blank(), # no y-axis numbers
+    axis.ticks = element_blank(),
+    plot.title = element_text(size = 24, face = "bold", # font for title
+                            family = "Castoro",  
+                            margin = margin(b = 5)),
+  
+  plot.subtitle = element_text(size = 14, color = "gray30", # font for subtitle
+                               family = "Castoro",
+                               margin = margin(b = 15)),
+  plot.margin = margin(10, 10, 10, 10),
+    legend.position = "top",
+    legend.justification = "left",
+    legend.direction = "horizontal",
+    legend.text = element_text(size = 10)
+  ) +
+  
+  # region legend
+  guides(color = guide_legend(
+    override.aes = list(shape = 15, # show colors as squares
+                        size = 4.7), 
+    nrow = 1
+  ))
+
+graph_civil <- data |> 
+  filter(war_type == "CIVIL WARS") |>
+  ggplot(aes(x = x_plot, y = y_plot)) +
+  
+  geom_segment(
+    data = civil_labels |> 
+      left_join(data |> select(war_name, y_plot), by = "war_name"),
+    aes(x = x_plot, y = y_plot, xend = x_plot, yend = label_y_plot),
+    color = "gray40",
+    size = 0.3
+  ) +
+  
+  geom_point(aes(size = avg_deaths, color = region), alpha = 1) +
+  
+  geom_text(
+    data = civil_labels,
+    aes(x = x_plot, y = label_y_plot, label = label_text),
+    size = 2.9,
+    color = "black",
+    lineheight = 0.9
+  ) +
+  
+  annotate("text", x = 1800, y = 1.55, label = "CIVIL WARS", 
+           size = 5, fontface = "bold", hjust = 0) +
+  
+  scale_color_manual(values = region_colors, name = NULL, 
+                     breaks = names(region_colors)) +
+  scale_size_area(max_size = 80,  
+                limits = c(min(data$avg_deaths), max(data$avg_deaths)),
+                guide = "none") +
+  
+  scale_x_continuous(limits = c(1800, 2015), 
+                     breaks = c(seq(1800, 2000, by = 20), 2011),
+                     expand = c(0.01, 0)) +
+  scale_y_continuous(limits = c(0.4, 1.6), expand = c(0, 0)) +
+  
+  labs(x = NULL, y = NULL,  # remove axis labels
+       caption = "Note: Each circle is sized according to the war's lower death estimate. A conventional war is defined here as an armed conflict fought with differentiated militaries and clear frontlines that\ncaused at least 500 combatant deaths due to fighting over its duration. A civil war is a conflict between combatants that were previously part of the same state, with at least one group now\nseeking control or secession.\nSources: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.\nOurWorldInData.org — Research and data to make progress against the world's largest problems. Licensed under CC-BY by the authors Bastian Herre, Christian Schwinehart and Klara Auerbach.")  +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", size = 0.3),
+    axis.text.x = element_blank(),  # no timeline here
+    axis.text.y = element_blank(),
+    axis.ticks = element_blank(),
+    plot.caption = element_text(size = 9.7, color = "gray50", hjust = 0, margin = margin(t = 15)),
+    plot.margin = margin(10, 10, 10, 10),
+    legend.position = "none"
+  )
+
+# combine interstate wars + civil wars
+combined_graph <- graph_interstate / graph_civil + 
+  plot_layout(heights = c(7, 3))  
+
+combined_graph
+
+

+
+

Graph Improvement

+

Data Preparation

+
+
+
# calculate average deaths from low and high estimates
+data <- data |>
+  mutate(
+    avg_deaths = (war_deaths_low + war_deaths_high) / 2,
+    deaths_thousands = avg_deaths / 1000,
+    deaths_millions = avg_deaths / 1000000,
+    war_type = ifelse(civil_war == "Civil war", "Civil war", "Interstate war"),
+    
+    # recode regions
+    region = case_when(
+      region == "Americas" ~ "Americas",
+      region == "Asia" ~ "Asia",
+      region == "Europe" ~ "Europe",
+      region == "North Africa and Middle East" ~ "North Africa\n& Middle East",
+      region == "Sub-Saharan Africa" ~ "Sub-Saharan Africa",
+      TRUE ~ region
+    ),
+    
+    # fix incorrect naming
+    war_name = ifelse(war_name == "Third Sino-Japanese War", 
+                      "Second Sino-Japanese War", 
+                      war_name)
+  ) 
+
+
+

Create the Plot

+
+
+
# UPPER CHART: select top 10 deadliest wars per region (excluding World Wars)
+top_wars_by_region <- data |>
+  filter(!war_name %in% c("World War I", "World War II")) |>
+  
+  # remove other second sino-japanese war
+  filter(!(war_name == "Second Sino-Japanese War" & avg_deaths < 100000)) |>
+  group_by(region) |> # top 10 per region
+  arrange(desc(avg_deaths)) |>
+  slice_head(n = 10) |>
+  ungroup()
+
+war_type_colors <- c(
+  "Civil war" = "#d73027",
+  "Interstate war" = "#4575b4"
+)
+
+# plot: bar chart
+upper_chart <- ggplot(top_wars_by_region, 
+                 aes(x = deaths_thousands, 
+                     y = fct_reorder(war_name, avg_deaths),
+                     fill = war_type)) +
+  
+  geom_col(width = 0.7, alpha = 0.9) +
+  
+  # labels showing death counts
+  geom_text(
+    aes(label = ifelse(
+      deaths_thousands >= 1000,
+      paste0(round(deaths_millions, 1), "M"), # when millions "M"
+      paste0(round(deaths_thousands, 0), "k") # when thousands "k"
+    )), 
+    hjust = -0.1, # position slightly to the right of the bar's end
+    size = 2.3,
+    fontface = "bold",
+    color = "gray20"
+  ) +
+  
+  # each region gets its own panel (vertically)
+  facet_wrap(~region, scales = "free_y", ncol = 1, strip.position = "left") +
+  
+  scale_fill_manual(values = war_type_colors, name = "War Type") +
+  
+  scale_x_continuous(
+    breaks = seq(0, 2500, 500), # marks every 500k
+    labels = function(x) {
+      ifelse(x >= 1000, 
+             paste0(x / 1000, "M"),  # "M" if > = 1000k
+             paste0(x, "k"))  # keep as "k" otherwise
+    },
+    expand = expansion(mult = c(0, 0.15))
+  ) +
+  
+  labs(
+    title = "Deadliest Wars by Region, 1800–2011",
+    subtitle = "Top 10 conflicts with highest death toll per region (excluding World Wars)",
+    x = "Average Deaths",
+    y = NULL
+  ) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    strip.text.y.left = element_text(size = 14, face = "bold", color = "gray20", angle = 0, 
+                                      hjust = 0, margin = margin(l = 0, r = 5)),
+    strip.background = element_rect(fill = NA, color = NA),
+    strip.placement = "outside",
+    panel.spacing.y = unit(0.5, "lines"), # spacing between facets
+    axis.text.y = element_text(size = 10, face = "bold"),
+    axis.text.x = element_text(size = 9),
+    plot.title = element_text(size = 18, face = "bold", margin = margin(b = 5)),
+    plot.subtitle = element_text(size = 10, color = "gray30", margin = margin(b = 10)),
+    legend.position = "top",
+    legend.box = "horizontal",
+    legend.title = element_text(size = 9, face = "bold"),
+    legend.text = element_text(size = 8),
+    plot.margin = margin(10, 10, 5, 5)
+  )
+
+# BOTTOM CHART: calculate TOTAL deaths per region and war type
+regional_summary <- data |>
+  filter(!war_name %in% c("World War I", "World War II")) |>
+  group_by(region, war_type) |>
+  summarise(
+    total_deaths = sum(avg_deaths),
+    n_wars = n(),
+    .groups = "drop"
+  ) |>
+  mutate(
+    # civil war values are negative so they extend LEFT
+    deaths_millions = ifelse(war_type == "Civil war", 
+                             -total_deaths / 1000000,
+                             total_deaths / 1000000)
+  )
+
+# calculate total per region for ordering
+region_totals <- regional_summary |>
+  group_by(region) |>
+  summarise(total = sum(abs(deaths_millions)), .groups = "drop")
+
+bottom_chart <- ggplot(regional_summary, 
+                      aes(x = deaths_millions, 
+                          y = fct_reorder(region, abs(deaths_millions), .fun = sum),
+                          fill = war_type)) +
+  
+  geom_col(alpha = 0.9, width = 0.7) +
+  
+  # vertical line at center
+  geom_vline(xintercept = 0, color = "gray30", linewidth = 0.5) +
+  
+  # labels for civil wars (left side) 
+  geom_text(
+    data = regional_summary |> filter(war_type == "Civil war"),
+    aes(label = ifelse(
+      abs(deaths_millions) >= 1,
+      paste0(round(abs(deaths_millions), 1), "M"),
+      paste0(round(abs(deaths_millions) * 1000, 0), "k")
+    )),
+    hjust = 1.1, size = 3.5, fontface = "bold", color = "gray20"
+  ) +
+  
+  # labels for interstate wars (right side) 
+  geom_text(
+    data = regional_summary |> filter(war_type == "Interstate war"),
+    aes(label = ifelse(
+      deaths_millions >= 1,
+      paste0(round(deaths_millions, 1), "M"),
+      paste0(round(deaths_millions * 1000, 0), "k")
+    )), 
+    hjust = -0.1, size = 3.5, fontface = "bold", color = "gray20"
+  ) +
+  
+  scale_fill_manual(values = war_type_colors) +
+  
+  # custom x-axis to show absolute values
+  scale_x_continuous(
+    labels = function(x) paste0(abs(x), "M"), # show all values as positive
+    breaks = seq(-5, 5, 1),
+    limits = c(-5.5, 5.5)
+  ) +
+  
+  labs(
+    title = "Total War Deaths by Region and Type",
+    subtitle = "All conflicts 1800–2011 (excluding World Wars) | Civil wars (left) vs Interstate wars (right)",
+    x = "Total Deaths",
+    y = NULL
+  ) +
+  
+  theme_minimal() +
+  theme(
+    panel.background = element_rect(fill = "#faf8f2", color = NA),
+    plot.background = element_rect(fill = "#faf8f2", color = NA),
+    panel.grid.major.y = element_blank(),
+    panel.grid.minor.x = element_blank(),
+    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
+    axis.text.y = element_text(size = 12, face = "bold"),
+    axis.text.x = element_text(size = 10),
+    plot.title = element_text(size = 16, face = "bold", margin = margin(b = 5)),
+    plot.subtitle = element_text(size = 11, color = "gray30", margin = margin(b = 10)),
+    axis.title.x = element_text(size = 12, face = "bold"),
+    legend.position = "none",
+    plot.margin = margin(10, 10, 10, 10)
+  )
+
+# using patchwork to stack the two plots vertically
+final_plot <- upper_chart / bottom_chart +
+  plot_layout(heights = c(4, 1)) + # upper plot 4 times taller than bottom plot
+  plot_annotation(
+    caption = "Source: Lyall, Jason. 2020. Divided Armies: Inequality and Battlefield Performance in Modern War. Princeton University Press.",
+    theme = theme(
+      plot.caption = element_text(size = 9, color = "gray50", hjust = 0, margin = margin(t = 10)),
+      plot.background = element_rect(fill = "#faf8f2", color = NA)
+    )
+  )
+
+final_plot
+
+

+
+
+ + +
+ +
+
+ + + + + +
+

Reuse

+

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

+

Citation

+

For attribution, please cite this work as

+
Solís (2025, Dec. 15). Data Visualization | MSc CSS: Combatant deaths in conventional wars, 1800-2011. Retrieved from https://csslab.uc3m.es/dataviz/projects/2025/100566135/
+

BibTeX citation

+
@misc{solís2025combatant,
+  author = {Solís, Adela},
+  title = {Data Visualization | MSc CSS: Combatant deaths in conventional wars, 1800-2011},
+  url = {https://csslab.uc3m.es/dataviz/projects/2025/100566135/},
+  year = {2025}
+}
+
+ + + + + + + + + + + diff --git a/projects/2025/100566135/wars_by_deaths_mars.csv b/projects/2025/100566135/wars_by_deaths_mars.csv new file mode 100644 index 00000000..82e7b6f5 --- /dev/null +++ b/projects/2025/100566135/wars_by_deaths_mars.csv @@ -0,0 +1,253 @@ +war_name,war_deaths_low,war_deaths_high,civil_war,midpoint,region +World War II,21058660,30859974,Interstate war,1942,Cross-Regional +World War I,7107951,8935966,Interstate war,1916,Cross-Regional +Third Sino-Japanese War,1689000,3300000,Interstate war,1941,Asia +Chinese Civil War,1200000,2071610,Civil war,1947.5,Asia +Vietnam War,1062068,1217357,Interstate war,1969,Asia +Napoleonic Wars,570328,598225,Interstate war,1807.5,Europe +Korean War,543936,718099,Interstate war,1951.5,Asia +Russian Civil War,379483,858742,Civil war,1919.5,Europe +Iran-Iraq War,228220,578000,Interstate war,1984,North Africa and Middle East +Spanish Civil War,203839,288150,Civil war,1937.5,Europe +Warlord Era Wars,193400,280300,Civil war,1925,Asia +American Civil War,166040,229000,Civil war,1863,Americas +Crimean War,142559,172197,Interstate war,1854.5,Europe +Tigrean and Eritrean War,126000,315000,Civil war,1986.5,North Africa and Middle East +Thousand Days' War,100000,100000,Civil war,1900.5,Americas +Taiping Rebellion,95000,111000,Civil war,1857.5,Asia +Franco-Prussian War,90275,277200,Interstate war,1870.5,Europe +North Yemen Civil War,84000,100000,Civil war,1965.5,North Africa and Middle East +Second Balkan War,77800,87207,Interstate war,1912.5,Europe +Russo-Japanese War,75952,90300,Interstate war,1904.5,Asia +Second Sino-Japanese War,64770,74870,Interstate war,1931.5,Asia +Bosnian War,60677,89894,Civil war,1993.5,Europe +Angolan Civil War,59650,68135,Civil war,1988.5,Sub-Saharan Africa +Paraguayan War,55400,311400,Interstate war,1867,Americas +Rif War,54370,70000,Civil war,1923.5,North Africa and Middle East +Ethiopian-Eritrean War,53000,121500,Interstate war,1999,North Africa and Middle East +First Mahdi War,46349,56461,Civil war,1883,Sub-Saharan Africa +Durrani Empire-Sikh War,40400,56900,Interstate war,1818,Asia +Russo-Turkish War of 1828-29,40015,46372,Interstate war,1828.5,North Africa and Middle East +Ethiopian-Mahdi War,40000,75000,Interstate war,1887,North Africa and Middle East +Greco-Turkish War,38900,52000,Interstate war,1909.5,Europe +November Uprising,37900,37900,Civil war,1831,Europe +Russo-Turkish War,33000,39779,Interstate war,1808.5,Europe +Russo-Turkish War of 1877-78,32000,110000,Interstate war,1877.5,North Africa and Middle East +Second Maratha War,31868,39696,Interstate war,1804,Asia +Vientiane-Siam War,31000,31000,Interstate war,1827,Asia +First Sino-Vietnamese War,30000,56000,Interstate war,1979,Asia +Satsuma Rebellion,26300,26300,Civil war,1877,Asia +North Vietnam-South Vietnam War,26100,43500,Interstate war,1974.5,Asia +Vietnamese-Cambodian War,25000,73300,Interstate war,1977,Asia +Polish-Ukrainian War,25000,25000,Interstate war,1918.5,Europe +Chaco War,24000,50000,Interstate war,1933.5,Americas +Soviet-Polish War,21278,47000,Interstate war,1919.5,Europe +US-Afghan,21242,30442,Interstate war,1998,Asia +Persian Gulf War,20229,40237,Interstate war,1991,North Africa and Middle East +Asante-Asin-Fante-UKG War,20021,28021,Interstate war,1806.5,Sub-Saharan Africa +Franco-Mexican War,19400,28962,Interstate war,1864.5,Americas +Montenegrin-Ottoman War,19337,19337,Civil war,1857,Europe +First Anglo-Sikh War,19298,37341,Interstate war,1847,Asia +Second Italo-Abyssinian War,18897,54000,Interstate war,1935.5,North Africa and Middle East +Czech-Polish War,18000,25000,Interstate war,1919,Europe +First Serbian Uprising,17600,17600,Civil war,1808.5,Europe +Hungarian War of Independence,16708,27503,Civil war,1848.5,Europe +Montenegrin-Turkish War,16700,17000,Civil war,1877,Europe +Austro-Prussian War,16107,43800,Interstate war,1866,Europe +British-Mahdi War,15503,18509,Interstate war,1897.5,Sub-Saharan Africa +Battle of Khalkhin Gol,15271,32974,Interstate war,1939,Asia +Second Congo War,15200,17900,Civil war,2000,Sub-Saharan Africa +Nagorno-Karabakh War,14000,14000,Interstate war,1993,Europe +Indian Rebellion of 1857,13534,13534,Civil war,1857.5,Asia +Congo Arab War,13500,19000,Interstate war,1893,Sub-Saharan Africa +War of the Pacific,13383,38889,Interstate war,1881,Americas +Latvian War of Independence,13246,15200,Civil war,1919,Europe +Nien (Nian) Rebellion,13000,20000,Civil war,1860.5,Asia +Ogaden War,12986,12986,Civil war,1977.5,North Africa and Middle East +Laotian Civil War,12795,15091,Civil war,1968.5,Asia +First Italo-Abyssinian War,12200,18000,Interstate war,1895.5,North Africa and Middle East +Venezuelan War of Independence,12077,14877,Civil war,1815.5,Americas +Sri Lanka-Tamil War I,12038,13947,Civil war,1996,Asia +Austro-Sardinian War of 1859,12036,19601,Civil war,1859,Europe +Estonian War of Independence,11588,11600,Civil war,1919,Europe +Yom Kippur War,11546,18826,Interstate war,1973,North Africa and Middle East +Russo-Persian War,11500,12300,Interstate war,1808.5,North Africa and Middle East +East Turkestan Kashgar War,11150,11150,Interstate war,1933.5,Asia +Bangladesh War,11100,12800,Civil war,1971,Asia +Siamese-Vietnamese War II,11000,11000,Interstate war,1843,Asia +Lithuanian-Soviet War,10444,10444,Civil war,1918.5,Europe +Russia-Bukhara Khanate War,10380,23117,Interstate war,1866.5,Asia +Croatian War of Independence,10000,10678,Civil war,1993,Europe +Wahhabi War,9900,31700,Interstate war,1814.5,North Africa and Middle East +Italo-Turkish War,9621,16600,Interstate war,1911.5,North Africa and Middle East +Libyan Civil War,9400,9400,Civil war,2011,North Africa and Middle East +Tukolor-Bambara War of 1855,9300,9300,Interstate war,1855,Sub-Saharan Africa +Hungarian Adversaries War,9295,9295,Interstate war,1919,Europe +Greek War of Independence,9000,26000,Civil war,1825,Europe +Soviet-Georgia War,8526,8526,Interstate war,1921,Europe +Egypt-Abyssinian War,8479,11251,Interstate war,1875.5,North Africa and Middle East +British-Zulu War,8369,10500,Interstate war,1879,Sub-Saharan Africa +Bornu Empire-Rabah Empire War,8300,10600,Interstate war,1893,Sub-Saharan Africa +Tukulor-Bambara War of 1860,8250,8250,Interstate war,1860.5,Sub-Saharan Africa +Second Russo-Persian War,8030,20000,Interstate war,1827,North Africa and Middle East +Austro-Sardinian War of 1848,7950,9200,Interstate war,1848,Europe +Mexican-American War,7721,13733,Interstate war,1846.5,Americas +Sino-French (Tonkin) War,7222,14222,Interstate war,1884,Asia +Sino-Kashgarian War,7172,12172,Interstate war,1876.5,Asia +Japanese Invasion of Taiwan,7164,7700,Interstate war,1895,Asia +Hispano-Moroccan War,7152,10000,Interstate war,1859.5,North Africa and Middle East +Finnish Civil War,7100,11100,Civil war,1918,Europe +Chilean War of Independence,7000,7000,Civil war,1816.5,Americas +Sri Lanka-Tamil War II,6921,7547,Civil war,2008.5,Asia +Second Anglo-Afghan War,6850,8150,Interstate war,1879.5,Asia +India-Pakistan War of 1965,6800,9600,Interstate war,1965,Asia +East Turkestan Gulja Incident,6764,30810,Interstate war,1944.5,Asia +Lebanese War of 1982-84,6756,10095,Interstate war,1983,North Africa and Middle East +Sino-Jahriyya Order War,6590,8250,Interstate war,1871,Asia +First Anglo-Afghan War,6100,9200,Civil war,1840.5,Asia +Nigerian-Biafran War,6000,84000,Civil war,1968.5,Sub-Saharan Africa +Argentine-Brazilian War,6000,6000,Interstate war,1826.5,Americas +First Anglo-Burmese War,5600,24300,Interstate war,1825,Asia +Second Ethiopian War,5500,35000,Civil war,1871,North Africa and Middle East +Rwanda War 1994,5500,5500,Civil war,1994,Sub-Saharan Africa +Lebanese Civil War of 1975-76,5500,11500,Civil war,1975.5,North Africa and Middle East +Ashanti-British War,5458,6477,Interstate war,1824.5,Sub-Saharan Africa +1948 Palestine War,5184,10500,Interstate war,1948.5,North Africa and Middle East +Argentine War of Independence,5158,5158,Civil war,1814,Americas +Chilean Civil War,5100,6100,Civil war,1891,Americas +Anti-Monarchical War,5080,6080,Civil war,1915.5,Asia +Uruguayan Civil War,5028,8500,Civil war,1843.5,Americas +Turko Persian War,5000,5000,Interstate war,1821.5,North Africa and Middle East +Sino-Sikh War,5000,11000,Interstate war,1841.5,Asia +Six Day War,4985,22483,Interstate war,1967,North Africa and Middle East +Khoja Rebellion I (East Turkestan),4800,4800,Civil war,1828,Asia +Peruvian War of Independence,4800,4800,Civil war,1822,Americas +Argentine Unitarian-Federalist War,4500,5500,Civil war,1829.5,Americas +First Opium War,4369,20364,Interstate war,1840.5,Asia +Russia-Khokand Khanate War,4214,6100,Interstate war,1875.5,Asia +Gwalior War,4141,4997,Interstate war,1843,Asia +Siege of Bharatpur,4106,8400,Interstate war,1825.5,Asia +Anglo-Baluch War,4039,6475,Interstate war,1843,Asia +Boshin War,4000,4000,Civil war,1868.5,Asia +Kashgaria-Urumchi Dungan War,4000,7000,Interstate war,1871,Asia +Farroupilha Revolution,3893,5843,Civil war,1840,Americas +Siamese-Vietnamese War,3880,3880,Interstate war,1833.5,Asia +US-Iraq War,3765,13615,Interstate war,2003,North Africa and Middle East +Russia-Khokandian War,3747,8777,Interstate war,1864.5,Asia +War of the Golden Stool,3692,5000,Interstate war,1900,Sub-Saharan Africa +Second Schleswig-Holstein War,3600,5500,Interstate war,1864,Europe +First Schleswig-Holstein War,3552,6000,Interstate war,1849,Europe +Franco-Tukulor War,3530,3530,Interstate war,1858,Sub-Saharan Africa +Ottoman Conquest of Arabia,3444,10556,Interstate war,1871,North Africa and Middle East +French-Algerian War,3400,3600,Interstate war,1830,North Africa and Middle East +Second Opium War,3300,3300,Interstate war,1858,Asia +Anglo-Ashanti War,3195,4196,Interstate war,1873.5,Sub-Saharan Africa +Sino-Soviet War,3143,3143,Interstate war,1929,Asia +War of 1812,3140,5260,Interstate war,1813.5,Americas +Boxer Rebellion,3136,3549,Interstate war,1900.5,Asia +Second Anglo-Boer War,3129,3863,Interstate war,1899.5,Sub-Saharan Africa +Sino-Kuchean Muslim War,3100,3300,Interstate war,1864.5,Asia +Second Dominican War,3030,5600,Interstate war,1846.5,Americas +Afghan-Sikh War,3000,17000,Interstate war,1837,Asia +Second Turko-Egyptian War,3000,3100,Civil war,1839.5,North Africa and Middle East +War of the Confederation,2950,3000,Interstate war,1838,Americas +First Sino-Japanese War,2864,15000,Interstate war,1894.5,Asia +Russo-Turkomen War,2708,10575,Interstate war,1879.5,Asia +Toyota War,2700,10000,Interstate war,1987,North Africa and Middle East +First Central American War,2600,6000,Interstate war,1876,Americas +Franco-Dahomean War,2597,5044,Interstate war,1891,Sub-Saharan Africa +British Expedition to Tibet,2540,3000,Interstate war,1904,Asia +Third Maratha War,2522,6449,Interstate war,1817.5,Asia +War of the Roman Republic,2500,2500,Civil war,1849,Europe +Melilla War,2500,2500,Interstate war,1893.5,North Africa and Middle East +India-Pakistan War of 1947,2500,4000,Interstate war,1948,Asia +British-Sokoto Caliphate War,2393,4469,Interstate war,1900,Sub-Saharan Africa +First Turko-Egyptian War,2364,7862,Civil war,1832,North Africa and Middle East +Second Spanish-Moroccan War,2300,10000,Interstate war,1909,North Africa and Middle East +First Egba-Dahomey War,2300,3300,Interstate war,1851,Sub-Saharan Africa +Anglo-Egyptian War,2260,2329,Interstate war,1882,North Africa and Middle East +Sino-Indian War,2105,2423,Interstate war,1962,Asia +Austro-Venetian War,2100,2100,Civil war,1849,Europe +Venezuelan Civil War,2100,2100,Civil war,1899,Americas +Saudi-Yemeni War,2100,2100,Interstate war,1934,North Africa and Middle East +Afghan-Persian War,2100,2100,Interstate war,1837,Asia +Tibet-Nepalese War,2092,2420,Interstate war,1855.5,Asia +Franco-Turkish War,2083,5379,Interstate war,1920,North Africa and Middle East +Second Chinese Revolution,2050,4300,Civil war,1913,Asia +Second Egba-Dahomey War,2040,7050,Interstate war,1864,Sub-Saharan Africa +Mahdi-Egyptian War,2039,3148,Interstate war,1889,North Africa and Middle East +Brazilian War of Independence,2000,2000,Civil war,1822.5,Americas +Ninth Cape Frontier War,1950,3880,Interstate war,1877.5,Sub-Saharan Africa +Second Taiwan Strait Crisis,1860,2667,Interstate war,1956,Asia +First Sino-Tibet War,1800,6000,Interstate war,1912.5,Asia +Xinhai Revolution,1800,2800,Civil war,1911,Asia +Fourth Dominican War,1795,2800,Interstate war,1855.5,Americas +Two Sicilies Insurrection,1785,6000,Interstate war,1860,Europe +War of Attrition,1744,6424,Interstate war,1969.5,North Africa and Middle East +Third and Fourth Central American War,1700,3100,Interstate war,1906.5,Americas +La Plata War,1700,2800,Interstate war,1851.5,Americas +Uganda-Tanzania War,1696,1696,Interstate war,1978.5,Sub-Saharan Africa +Central American National War,1550,2450,Interstate war,1856.5,Americas +Ecuadorian War of Independence,1528,1528,Civil war,1821.5,Americas +Kosovo War,1502,1502,Civil war,1999,Europe +Turko-Cypriot War,1500,5800,Civil war,1974,Europe +Second Sino-Tibet War,1500,1500,Interstate war,1918,Asia +Texas Revolution,1493,2378,Civil war,1835.5,Americas +Central American War,1456,2231,Interstate war,1863,Americas +Neapolitan War,1426,1426,Interstate war,1815,Europe +Gurkha War,1400,3830,Interstate war,1815,Asia +Iraq-Kuwait War,1400,1400,Interstate war,1990,North Africa and Middle East +Tukolor-Tamba War,1400,1400,Interstate war,1852.5,Sub-Saharan Africa +Hejaz War,1350,1650,Interstate war,1922,North Africa and Middle East +Aceh War,1315,1351,Civil war,1873.5,Asia +Bolivia-Peru War,1300,1300,Interstate war,1841,Americas +Battle of Lake Khasan,1243,1243,Interstate war,1938,Asia +Operation Polo,1201,1242,Interstate war,1948,Asia +Anglo-Persian War,1200,2000,Interstate war,1856.5,North Africa and Middle East +Black September War of 1970,1200,1350,Civil war,1970,North Africa and Middle East +Suez Crisis,1198,3216,Interstate war,1956,North Africa and Middle East +Third Anglo-Afghan War,1177,1236,Interstate war,1919,Asia +Mahdist-Italian War,1130,3142,Interstate war,1893.5,North Africa and Middle East +Kargil Conflict,1107,3527,Interstate war,1999,Asia +Russo-Chinese War,1080,4000,Interstate war,1900,Asia +Franco-Mandingo War V,1051,1100,Interstate war,1891.5,Sub-Saharan Africa +Franco-Rabah Empire War,1025,1825,Interstate war,1900,Sub-Saharan Africa +Falklands War,1001,1255,Interstate war,1982,Americas +Yemen Border War II,1000,1000,Interstate war,1979,North Africa and Middle East +Franco-Moroccan War,1000,1390,Interstate war,1844,North Africa and Middle East +Franco-Spanish War,1000,1000,Interstate war,1823,Europe +Wadai War,847,3562,Interstate war,1909.5,Sub-Saharan Africa +Serbo-Bulgarian War,842,9685,Interstate war,1885.5,Europe +Turkish-Armenian War,755,1473,Interstate war,1920,North Africa and Middle East +Peruvian-Ecuadorian War,700,800,Interstate war,1941,Americas +Second Sino-Vietnamese War,700,1700,Interstate war,1987,Asia +Gran Colombia-Peru War,660,4500,Interstate war,1828.5,Americas +Waziristan Campaign,659,3550,Interstate war,1919.5,Asia +Dniestrian Independence War,648,1262,Civil war,1992,Europe +War of Dogali,631,1368,Interstate war,1887,North Africa and Middle East +Israel-Hezbollah War,619,721,Interstate war,2006,North Africa and Middle East +Portugal-Gaza Nguni War,610,9950,Interstate war,1895,Sub-Saharan Africa +Fifth Cape Frontier War,580,2090,Interstate war,1818.5,Sub-Saharan Africa +Spanish-American War,580,1180,Interstate war,1898,Asia +First Matabele War,578,2091,Interstate war,1893.5,Sub-Saharan Africa +France-Tukolor Empire War,524,524,Interstate war,1893,Sub-Saharan Africa +British Abyssinian Expedition,501,802,Interstate war,1868,North Africa and Middle East +Bombardment of Algiers,442,2142,Interstate war,1816,North Africa and Middle East +Georgian-Ossetian Conflict,415,2035,Civil war,1991.5,Europe +Second Central American War,400,2200,Interstate war,1885,Americas +Tripolitan War,396,977,Interstate war,1803,North Africa and Middle East +Second Franco-Hova War,380,485,Interstate war,1895,Sub-Saharan Africa +Yemen Civil War,362,2640,Civil war,1994,North Africa and Middle East +Azeri-Armenian War,350,700,Interstate war,1920,Asia +Sino-Khokandian War,332,332,Interstate war,1865,Asia +Franco-Mandingo War VIII,322,1022,Interstate war,1898,Sub-Saharan Africa +War of the Oranges,314,382,Interstate war,1801,Europe +Seventh Cape Frontier War,310,3000,Interstate war,1846.5,Sub-Saharan Africa +Russo-Khivan War,246,266,Interstate war,1873,Asia +Georgia-Russia War,225,244,Civil war,2008,Europe +Anglo-Turkish War,213,213,Interstate war,1808,North Africa and Middle East +Football War,206,368,Interstate war,1969,Americas +Papal States War,150,1000,Interstate war,1860,Europe +Ecuadorian-Colombian War,148,148,Interstate war,1863,Americas +Eighth Cape Frontier War,114,3700,Interstate war,1851,Sub-Saharan Africa +Polish-Lithuanian War,30,30,Interstate war,1920,Europe