9.9 Animated Maps
# create animation
= tm_shape(world) + tm_polygons() +
urb_anim tm_shape(urban_agglomerations) + tm_dots(size = "population_millions") +
tm_facets(along = "year", #the main change
free.coords = FALSE) #still important
# save animation file
tmap_animation(urb_anim,
filename = "urb_anim.gif",
delay = 25)
![](images/urb_anim.gif)
Urban Areas
![](images/usa_anim.gif)
USA Populations over Time