Je data labelen

Interactieve datavisualisatie met plotly in R

Adam Loy

Statistician, Carleton College

23_default_scatter.gif

Interactieve datavisualisatie met plotly in R

23_default_bar.gif

Interactieve datavisualisatie met plotly in R

23_default_box.gif

Interactieve datavisualisatie met plotly in R

De standaard aanpassen

 wine %>%
  count(Type) %>%  
  plot_ly(x = ~Type, y = ~n,
      # De standaard getoonde info wijzigen
          hoverinfo = "y" 
  ) %>%
  add_bars()

hoverinfo =

  • "all"
  • "x"
  • "y"
  • "x+y"
  • "x+y+z"
Interactieve datavisualisatie met plotly in R

Aangepaste hovertekst

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol,

hoverinfo = "text",
text = ~paste("Flavanoids:", Flavanoids, "<br>", "Alcohol:", Alcohol)
) %>% add_markers()
  • tilde, ~, om kolommen aan esthetiek te koppelen

Interactieve datavisualisatie met plotly in R

Laten we oefenen!

Interactieve datavisualisatie met plotly in R

Preparing Video For Download...