https://mtes-mct.github.io/parcours_r_module_datavisualisation/animer-ses-graphiques-ggplot-avec-gganimate.html

https://stt4230.rbind.io/tutoriels_etudiants/hiver_2018/ggiraph/

https://thinkr.fr/cartographie-interactive-comment-visualiser-mes-donnees-spatiales-de-maniere-dynamique-avec-leaflet/

https://rpubs.com/eshel_s/plotlytutorial

https://rstudio.github.io/r2d3/articles/introduction.html

library(ggplot2)
library(gganimate)
library(dplyr)
library(gapminder)
data <- gapminder
data %>%
  arrange(desc(pop)) %>%
  mutate(country = factor(country)) %>%
  ggplot(aes(x=gdpPercap, y=lifeExp, size=pop, fill=continent)) +
  geom_point(alpha=0.5, shape=21, color="black")

library(ggplot2)
library(gganimate)
library(dplyr)
library(gapminder)
data <- gapminder
data %>%
  arrange(desc(pop)) %>%
  mutate(country = factor(country)) %>%
  ggplot(aes(x=gdpPercap, y=lifeExp, size=pop, fill=continent)) +
  geom_point(alpha=0.5, shape=21, color="black")+
  transition_states(states=year,
                    transition_length = 1,
                    state_length = 2)+
  labs(title="Espérance de vie à la naissance en fonction du revenu par pays",
       subtitle="En {closest_state}")