Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
Objective of original data was to show the power of America by presenting the size of its military in terms of the amount spent in comparison with other militarised countries in order of spend. The target audience is the general public with a US more revolutionary audience as the focus. In some cases politicised content agitating for change and publishing a range of topical data both historical, revolutionary and political, typically pro US. The visualisation chosen had the following three main issues: The message it’s trying to deliver is unclear and information is clustered and laid out poorly. The style of plot is harder for the audience to read the information.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(ggplot2)
library(tidyverse)
library(kableExtra)
library(plotly)
options(knitr.table.format = "html")
options(scipen = 999)
d <- read.csv("Military Expenditure Top 20.csv")
View(d)
colnames(d)[1] <- "Country"
fig1 <- plot_ly(d, x = ~reorder(Country,spending), y = ~spending, type = 'bar',
color = ~Country,
line = list(color = 'rgb(8,48,107)',
width = 1.5))
fig1 <- fig1 %>% layout(title = "Military Expenditure Top 20 countries for 2020",
xaxis = list(title = ""),
yaxis = list(title = ""))
Data Reference
The following plot fixes the main issues in the original.