Box office at the movies

The data set box of the package classdata contains weekly box office gross for all movies in theaters in the last five years, see ?box for a description of all variables in the data set.

For all of the questions use functionality from the tidyverse whenever possible.

  1. Download the RMarkdown file with these homework instructions to use as a template for your work. Make sure to replace “Your Name” in the YAML with your name.

  2. Draw a line chart. Each line in the chart should represent the total gross (Total.Gross) of one movie over time. Describe the plot. Hint: use group instead of color in aes() to avoid thousands of colors in one chart.

  3. Gross shows weekly box office gross in US dollars. Find monthly summaries for the number of different movies in theaters and monthly summaries of box office gross for each movie. Draw lines of these summaries for each year (in two separate plots). Describe the plots in words. Are there seasonal trends?
    Hint: use lubridate to extract year and month from the date at which box office data was released.

  4. Find box office gross by day of the year (check ?yday) for each year (we don’t actually have daily data - we only have data for every seven days). Plot cumulative yearly gross (for each movie) for each year by day of the year. Describe the plot.
    Extra point for nice labels of very successful movies. What kind of year do you expect the remainder of 2022 to be in terms of box office revenues from movies?

Note: your submission is supposed to be fully reproducible, i.e. the TA and I will ‘knit’ your submission in RStudio.

For the submission: submit your solution in an R Markdown file and (just for insurance) submit the corresponding html (or Word) file with it.