I would like to plot change between values as a single bar between values as Economist does:
This plot is called dumbbell, so question is likely to be a duplicate if you know what to search for.
Here is a code example that makes a bar plot for two categories. It would be great to be able to plot it per example above.
library(ggplot2)
library(ggthemes)
Animals <- read.table(
header=TRUE, text='Year Reason Species
1 2018 Genuine 24
2 2019 Genuine 16
3 2019 Misclassified 85
4 2018 Misclassified 41
5 2018 Taxonomic 2
6 2019 Taxonomic 7
7 2018 Unclear 41
8 2019 Unclear 117')
Animals$Year <- as.character(Animals$Year)
ggplot(Animals, aes(factor(Reason), Species, fill = Year)) +
geom_bar(stat="identity", position = "dodge") +
scale_fill_brewer(palette = "Set1") +
theme_economist() +
coord_flip()
Ability to colour decrease as pink (for example) would be a bonus.





