1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to A/B Testing in R

Exercise

Plotting conversion rate seasonality

Earlier we said that based on the summary by month, it looks like there are seasonal effects. Conversion rates are higher in the summer and in December. Let's visualize that effect, but by week of the year. We'll use ggplot2 to build our plot. The tidyverse packages and lubridate are pre-loaded for you.

Instructions

100 XP
  • Save your data frame with conversion rates by week of the year to a data frame called click_data_sum.
  • Use the newly created data frame to make a plot where the x-axis is the week of the year and the y-axis is the conversion rate.
  • Use the geom_point() and geom_line() geoms to build the plot.

We also updated our plot a bit using scale_y_continuous() to make sure our axes goes from 0 to 1 and converts the values to percentages. The percent setting comes from the scales package.