Animated sorted bar chart with bars overtaking each other
How would you go at reproducing this chart from Jaime Albella in R ? See the animation on visualcapitalist.com or on twitter (giving several references in case one breaks). I'm tagging this as ggplot2 and gganimate but anything that can be produced from R is relevant. data (thanks to https://github.com/datasets/gdp ) gdp <- read.csv("https://raw.github.com/datasets/gdp/master/data/gdp.csv") # remove irrelevant aggregated values words <- scan( text="world income only total dividend asia euro america africa oecd", what= character()) pattern <- paste0("(",words,")",collapse="|") gdp <- subset(gdp