2024-04-07

library(readxl)
library(ggplot2)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(forcats)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
net_data = read_excel("C:/Users/PaulG/OneDrive/Documents/netflix.xlsx")

Introduction

Netflix Shows and Their Ratings

For this project I am examining a data set from Netflix. It contains various programs with release dates as early as 1940 to 2017. The shows all vary in maturity ratings, user scores and rating descriptions but I am going to utilize what I have learned so far to gain some kind of insight from this data. Looking at it from a fledgling Business Intelligence perspective I am going to identify opportunities for Netflix in terms of marketing and content development.

Plotting the number of releases by production year

What Production years are encompassed

Which Year Had The Most?

While Netflix has a large range between the earliest to latest production year of its movies, the bulk of its content was released in 2017, with modest options in between.

Top 5

What are the best rated shows in this data set

Netflix uses a content rating system to rate shows by maturity level and also provides a user score for quality. The user score is a quality rating given by Netflix users.

## # A tibble: 5 × 4
##   title                     ratingLevel                    rating `release year`
##   <chr>                     <chr>                          <chr>           <dbl>
## 1 Lucky Number Slevin       strong violence, sexual conte… R                2006
## 2 The Hunter                language and brief violence    R                2011
## 3 Lottie Dottie Chicken     Suitable for all ages.         TV-Y             2009
## 4 Ó Pai, Ó - Look at This For mature audiences.  May no… TV-MA            2007
## 5 Nymphomaniac: Volume 1    This movie has not been rated. NR               2013

Top 5

Continued

These are the top 5 according to the user rating scale and represent a high viewership. Two of the listings are rated R, one MA, one is rated for all ages and the last is Not Rated. From a BI perspective this list prompts good questions about the relationship between how the company rates a show, the age group associated with the rating, how the audience rates the shows and the possible decision making the company makes in terms of where the highest probability of return on investment for content lies. Companies have limited resources to invest in the production of content and seeing which age groups correspond to the highest user ratings can indicate where to focus resources for content. The current group shows us that the best groups are those of viewers older than 17. In contrast looking at the bottom 5 listings can identify areas of opportunity to increase viewership and user engagement.

Rating vs rating

How does Rating Descriptions compare to User Ratings

## Warning: There were 9 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `name = fct_reorder(rating, `user rating score`)`.
## Caused by warning in `mean.default()`:
## ! argument is not numeric or logical: returning NA
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 8 remaining warnings.
## Warning in FUN(X[[i]], ...): NAs introduced by coercion
## Warning: Removed 988 rows containing missing values or values outside the scale range
## (`geom_bar()`).

## Code for Previous Graphic

net_data %>% mutate(name = fct_reorder(rating, user rating score)) %>% ggplot( aes(x=rating, y = as.numeric(user rating score), na.rm = TRUE)) + geom_bar(stat=“identity”, fill=“#f68060”, alpha=.6, width=.4) + coord_flip() + ylim(0, 100) + ylab(“User Rating Score”) + xlab(““) + theme_bw()

Rating vs rating

Continued

Here we examine the question of age range and user rating more broadly. Given the plot above we can see that the highest user rated programming is in the TV-14 maturity level, followed by TV-MA, PG and NR. TV-14 and PG constitute an age range between 8 and 14 years. This group holds the highest user ratings and would therefore from a business intelligence stand point be considered a profitable group to market programming to, as well as encouraging content studios to produce content for this group. TV-MA and NR are the next two opportunities. Although NR would be considered a toss up of age groups as they consist of programming that has not been granted a rating. TV-MA would therefore be the best marketing opportunity.

Netflix Rating vs Users

Where do the averages lie in the two sets

But what is the exact relationship between a programs rating and the user value? Netflix assigns a numerical value according to maturity metrics in the content such as nudity, bad language, and violence. The higher the number the higher the maturity level. In contrast the user rating states the quality of the programming according to users and is based on user opinions. Its max is 100, while the rating description tops at 120. If we compare the two we see that the user score is ranging in the upper level vs the description. This is another indicator that there is a correlation between a higher maturity rating and user score.

Netflix Rating vs Users

Continued

## Warning: Can't display both discrete & non-discrete data on same axis

##User rating vs rating scatter | Continued

The next figure displays a large cluster between both variables, based between 80 and 98 on the user rating score. This shows us the correlation between a higher maturity age group and higher user rating. This is a great indicator that the best age group to develop new content too is the older age groups. Its possible younger viewers are not engaged enough with the content rating system to provide accurate data for their group but from what is provided we see older age groups are more engaged to provide feedback.

#User rating vs rating scatter | Deeper look into Ratings vs Age Groups

## `geom_smooth()` using formula = 'y ~ x'