Find more information here:

Making the .gif was no easy task. You will need ImageMagic (zip + installer) and ffmpeg. I recommend these two articles:

final output

final output

#library(DT)
#library(forcats)
library(gganimate) #may need: devtools::install_github("dgrtwo/gganimate")
library(animation)
library(googlesheets)
library(ggmap)
library(knitr)
library(raster) #get India's boundary coordinates
library(rgeos) #to simplify file
library(tidyverse)
library(plotly)
library(stringr)
library(tweenr)
library(ggrepel)

Download and simplify shapefiles

chart for plot

Animation

Animate plot to state centroids

Text

Animate corners to map of India

Animation

Animate India

All together

The ggmap library is provided by:

D. Kahle and H. Wickham. ggmap: Spatial Visualization with ggplot2. The R Journal, 5(1), 144-161. URL http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf