pacotes <- c("readr", "dplyr", "ggplot2", "PerformanceAnalytics", "tidyr" )
lapply(pacotes, library, character.only = TRUE)
filmes <- read_csv("imdb_movies.csv")
filmes$Runtime <- gsub(" min", "", filmes$Runtime)
filmes$Runtime <- as.numeric(filmes$Runtime)
filmes$Released_Year <- as.numeric(as.character(filmes$Released_Year))
The ideal approach when making any kind of recommendation would be to analyze the person’s tastes and preferences in order to recommend something that matches them. For this reason, recommending a movie to someone we do not know can be a significant challenge, as tastes and preferences can vary widely from person to person.
In this context, using the dataset provided for this project, it is possible to attempt to select a movie with the potential to please anyone. I will consider the variables IMDB_Rating, Meta_Score, and No_of_Votes to select a movie with this potential.
IMDB_Rating and Meta_Score indicate whether the movie is well-rated by critics and the general public, while No_of_Votes indicates the movie’s popularity.
# Selecting movies with the best combinations of IMDB_Rating, No_of_Votes, and Meta_score
filmes$score <- filmes$IMDB_Rating + filmes$Meta_score/10 + log10(filmes$No_of_Votes)
filmes_ordenados <- filmes[order(-filmes$score), ]
top_10_filmes <- filmes_ordenados[1:10, c("Series_Title", "score")]
print(top_10_filmes)
## # A tibble: 10 × 2
## Series_Title score
## <chr> <dbl>
## 1 The Godfather 25.4
## 2 Pulp Fiction 24.6
## 3 The Lord of the Rings: The Return of the King 24.5
## 4 12 Angry Men 24.4
## 5 Schindler's List 24.4
## 6 The Lord of the Rings: The Fellowship of the Ring 24.2
## 7 Casablanca 24.2
## 8 The Godfather: Part II 24.1
## 9 Rear Window 24.0
## 10 Sen to Chihiro no kamikakushi 24.0
The list above shows movies with the best combinations of IMDb Rating, number of votes (on a logarithmic scale to avoid large distortions), and the weighted average of critics’ reviews.
It is reasonable to consider that any of the movies on the list would be a good recommendation for an unknown person. However, since the question requests only one recommendation, the logical choice would be the first movie on the list.
Therefore, my movie recommendation for someone I don’t know would be “The Godfather.”