Recently, I followed this tutorial over here (https://www.datanovia.com/en/blog/gganimate-how-to-create-plots-with-beautiful-animation-in-r/ , scroll to the middle) on how t