title: MAPS & Animation in R
body: <p>Trying to do similar to this: <a href="https://www.r-bloggers.com/how-the-ghana-floods-animation-was-created/" rel="nofollow noreferrer">How the Ghana Floods animation was created</a></p>
  
  <p>My code below</p>
  
  <pre><code>library(ggmap)
  library(ggplot2)
  library(gganimate)
  #devtools::install_github("dgrtwo/gganimate")
  
  library(readxl)
  
  s_data &lt;- read_excel("объекты.xls")
  head(s_data)
  
  p &lt;- ggmap(get_map(c(32.10399,49.04548), zoom = 5))
  p+geom_point(data = s_data, aes(x = longitude, y = latitude, size=channels_contracted, cumulative = TRUE, frame = year), alpha=0.5)+ labs(title = "Objects until 2016 \n")
  gganimate(p, outfile = "outfile11.gif", convert = "gm convert", ani.width = 700, title_frame = TRUE)
  </code></pre>
  
  <p>When trying to get points on the map - I have some warnings about unknown aesthetics (cumulative, frame). Then when I try to animate the result - I just got crash - see the code output below.</p>
  
  <pre><code>&gt; Warning: Ignoring unknown aesthetics: cumulative, frame Warning
  &gt; message: Removed 11 rows containing missing values (geom_point). 
  &gt; &gt; 
  &gt; &gt; gganimate(p, outfile = "outfile11.gif", convert = "gm convert", ani.width = 700, title_frame = TRUE) Error in gganimate(p, outfile =
  &gt; "outfile11.gif", convert = "gm convert",  :    No frame aesthetic
  &gt; found; cannot create animation
  </code></pre>
  
  <p>What is the problem and how can i fix it?</p>
  
  <p>If it's important - WindowsX64... So I think there will be some difficulties with the animations, ImageMagock and so on...</p>
  
  <p>UPDATE: THE FIX was found with the help of @lukeA
  It seems some warnings that happened during the work of a script crashed the animation generation.</p>
  
  <p>Working solution:</p>
  
  <pre><code>    library(ggmap)
  library(ggplot2)
  library(gganimate)
  library(readxl)
  library(animation)
  #s_data &lt;- read_excel("C:/Users/fire/OneDrive/Документы/AMICO_WORK/current/объекты.xls")
  
  channels_contracted=c(10,20,30,40,50,70,10,1)
  year=c(1999,1999,2000,2000,2001,2002,2003,2003)
  latitude=c(44.61217,46.97676,46.66602,46.51235,46.77762, 41.00222, 46.51235,46.77762)
  longitude=c(30.72798,30.71394, 31.94281, 30.70631, 33.47262, 29.90559, 30.71394, 30.71775)
  type=c("ASZ", "AGS", "ASZ", "AGS", "GNS", "GNS1", "GNS1", "AGS")
  df = data.frame(channels_contracted, year, latitude, longitude, type) 
  
  p &lt;- ggmap(get_map(c(32.10399,49.04548), zoom = 5))
  
  suppressWarnings(p &lt;- p + geom_point(aes(longitude,latitude,frame=year,cumulative=FALSE, size = channels_contracted, color = type), df, alpha=0.3))
  
  ani.options(interval=2)
  gganimate(p)
  </code></pre>