Feel free to play around with the code, and see how it translates to the knitted output.

Highlighting different geometries

Differences between these two similar ggplot pipelines lead to different plots.

baby_names %>%
  ggplot(aes(x = Year, y = Count, fill = Gender)) +
  geom_col()

baby_names %>%
  ggplot(aes(x = Year, y = Count, color = Gender)) +
  geom_line()

Animate line chart

With gganimate library, you can animate a line chart. Message me if you need the code.

library(gganimate)

baby_names %>%
  ggplot(aes(y =     , x =    , color =      )) +
  geom_     () +
  geom_    () +
  transition_      (    )

Contact Me

I help organisation build online success with Digital Analytics and A/B testing. Message me at