Ajouter des couches

Visualisation de données interactive intermédiaire avec plotly en R

Adam Loy

Statistician, Carleton College

Augmenter le texte du curseur à 40 et changer la couleur en noir.

Visualisation de données interactive intermédiaire avec plotly en R

Couche de texte

world_indicators %>%
  plot_ly(x = ~income, y = ~co2) %>%
  add_text(
    x = 6500, y = 1, text = ~year, frame = ~year,
    textfont = list(size = 150, color = toRGB("gray80"))
  )

23-text-only-animation.gif

Visualisation de données interactive intermédiaire avec plotly en R

Couche de points

world_indicators %>%
  plot_ly(x = ~income, y = ~co2) %>%
  add_text(
    x = 6500, y = 1, text = ~year, frame = ~year,
    textfont = list(size = 150, color = toRGB("gray80"))
  ) %>%
  add_markers(frame = ~year, ids = ~country) %>%
  layout(
    xaxis = list(type = "log"), yaxis = list(type = "log")
  )
Visualisation de données interactive intermédiaire avec plotly en R

Fignoler

world_indicators %>%
  plot_ly(x = ~income, y = ~co2) %>%
  add_text(
    x = 6500, y = 1, text = ~year, frame = ~year,
    textfont = list(size = 150, color = toRGB("gray80"))
  ) %>%
  add_markers(frame = ~year, ids = ~country) %>%
  layout(
    xaxis = list(type = "log"), yaxis = list(type = "log"),
    showlegend = FALSE
  ) %>%
  animation_slider(hide = TRUE)

23-polished.gif

Visualisation de données interactive intermédiaire avec plotly en R

23-polished.gif

Visualisation de données interactive intermédiaire avec plotly en R

Passons à la pratique !

Visualisation de données interactive intermédiaire avec plotly en R

Preparing Video For Download...