This report presents an analysis of India’s weapon exports from the year 1997 to 2022. The focus is on visualizing trends over these years, highlighting changes before and after 2014, which marks the election of Prime Minister Narendra Modi.
# Load necessary libraries
library(ggplot2)
# Yearly export values from 1997 to 2022
years_India <- 1997:2022
exports_India <- c(38, 59, 19, 43, 83, 95, 148, 196, 245, 190, 105, 46, 73, 113, 158, 163, 110, 148, 157, 497, 607, 524, 118, 108, 200, 247)
# Create a data frame
data_India <- data.frame(Year = years_India, exports_India = exports_India)
# Calculate averages
mean_pre_2014 <- mean(data_India$exports_India[data_India$Year <= 2014])
mean_post_2014 <- mean(data_India$exports_India[data_India$Year > 2014])
# Generate the plot
ggplot(data_India, aes(x = Year, y = exports_India)) +
geom_line() +
geom_point() +
geom_hline(aes(yintercept = mean_pre_2014, color = "Pre-Modi Average"), linetype = "dashed") +
geom_hline(aes(yintercept = mean_post_2014, color = "Under Modi Average"), linetype = "dashed") +
geom_vline(aes(xintercept = 2014, color = "Modi's Election"), linetype = "dashed") +
scale_color_manual(name = "Legend",
values = c("Pre-Modi Average" = "blue",
"Under Modi Average" = "darkgreen",
"Modi's Election" = "red")) +
labs(title = "India's Weapon Exports (1997-2022)",
subtitle = "Source: SIPRI | Visualization: User",
x = "Year", y = "Exports (Trend-Indicator Value)") +
theme_minimal() +
theme(legend.position = "bottom")
India’s Weapon Exports (1997-2022)
The analysis demonstrates notable changes in India’s weapon export trends, particularly around the year 2014. This structured approach not only highlights key changes in the export patterns but also underscores the influence of political shifts on trade dynamics.