I'm trying to stack a bar plot using ggplot in R studio! Here is my data that I'd like to plug in:
Country Con Lab
England 14364350 11389497
NI 3895 0
Scotland 757949 717007
Wales 528839 71354
I'm a total beginner with R Studio so I'm sorry if this question is tedious! Ideally if you could help me stack it by the party that came second that would be helpful! (Lab is second apart from Wales)
something a bit like below would be fab!! I'm struggling on how to get started, but hopefully the picture shows what the stacked graph would look like (fingers crossed)
What I've Tried so Far:
library('ggplot2')
ggplot(elections, aes(x= Country, y= ?? (this is where I hit a wall)
Data
elections <- read.table(header = TRUE, stringsAsFactors = FALSE,
text = "Country Con Lab
England 14364350 11389497
NI 3895 0
Scotland 757949 717007
Wales 528839 71354")