project 8 : movies

Author

Aminata Diatta

introduction :

the dataset that I will be analyzing the ‘movies’ dataset, specifically examining the ratings of comedy shows aired between the years 2000 and 2002. This analysis aims to delve into the viewership preferences and trends surrounding comedic content during this specific time period.

load the libraries

library(tidyverse)
Warning: package 'tidyverse' was built under R version 4.3.3
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.4.4     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
setwd("C:/Users/satad/Desktop/data110")
library(dslabs)
Warning: package 'dslabs' was built under R version 4.3.3
data(package= "dslabs")
view(movielens)

clear the dataset

movies2<- movielens |>
 filter(genres == "Comedy" & year %in% c("2000", "2001", "2002") & title %in% c("Wet Hot American Summer", "American Pie 2", "Snow Day"))
view(movies2) 

Create a headmap that represant the rating of the comedy in 2000,2001,and 2002

ggplot(movies2, aes(x = year, y = title, fill = rating)) +
  geom_tile() +
  labs(x = "year", y = "title of the comedy") +
  ggtitle("rating of the comedy show in 2000,2001,and 2002") +
  scale_fill_continuous(name = "rating") +
  theme_light()

comments

The visualization displays the ratings of comedy shows specifically between the years 2000 and 2002. Looking at the chart, it’s evident that “American Pie 2” stands out with the highest rating among all the comedy shows during this period. This high rating could be attributed to various factors. For instance, “American Pie 2” might have garnered such acclaim due to its storyline, humor, and entertainment value, which resonated well with the audience. Additionally, it’s possible that the movie benefited from being part of a popular franchise or series, leading to increased anticipation and viewership. Overall, the visualization highlights the exceptional performance of “American Pie 2” in terms of audience ratings during the specified years, making it a standout comedy show of that time.