load data in

library(readxl)
surveyresult<- read_excel("C:/Users/Cong/Desktop/Video Streaming Service in India v2.xlsx")
View(surveyresult)

ANALYSIS FOR EXISTING CUSTOMERS

create subset for existing Netflix customers

ExistingCustomers <- subset(surveyresult, surveyresult$`RespondentCategory` == "1", 
                    select=c(1:18,31))
View(ExistingCustomers)

Age and Education Level for Existing Customers

library(ggplot2)
ggplot(ExistingCustomers, aes(Age,fill=Education)) +geom_bar() +guides(fill=guide_legend(title = "ExistingCustomers - Age and Education Level"))+theme_dark()

#From this plot we can tell that most of Netflix's existing customers are from 18-30 years old. And most of them are having master degrees. 

How Much Existing Customer Pay and Are They Happpy For It

ggplot(ExistingCustomers, aes(HowMuchDoYouPayNetflixEveryMonthNow,fill=LikeNetflixPrice)) +geom_bar() +guides(fill=guide_legend(title = "Existing Cusomters--Happy About The Price?"))

#Most of the existing customers pay $5-$10 monthly fee to Netflix now. 
#Most of the people who pay $0-$5 now are happy about the price. 
#Almost 80% of the people who pay $5-10 are not happy about the price. 
#The $10-15 category is like of half and half. 
#And no one from the $15-20 is happy about the price. 

Content Analysis for Existing Customers

#Create Subset for Content
ExistingCustomersContent <- subset(ExistingCustomers, select=c(1,9:13))
View(ExistingCustomersContent)
#Rotate to Long Dataset 
library(tidyr)
## Warning: package 'tidyr' was built under R version 3.4.3
long<- ExistingCustomersContent%>% gather(Content, YN, WatchHollywoodOnNetflix:WatchDocumentatiesonNetflix)
View(long)
ggplot(long, aes(Content,fill=YN)) +geom_bar() +guides(fill=guide_legend(title = "Content Analysis"))+ theme(axis.text.x=element_text(angle=90, hjust=1))

ANALYSIS FOR POTENTIAL CUSTOMERS

create subset for potential customers

PotentialCustomers <- subset(surveyresult, surveyresult$`RespondentCategory` == "2"|surveyresult$`RespondentCategory` == "3", 
                    select=c(2:6,19:30))
View(PotentialCustomers)

Age and Education Level for Potential Customers

library(ggplot2)
ggplot(PotentialCustomers, aes(Age,fill=Education)) +geom_bar() +guides(fill=guide_legend(title = "PotentialCustomers - Age and Education Level"))+theme_dark()

#From this plot we can tell that most of Netflix's potential customers are from 31-45 years old. And most of them are having master degrees. 

How Much Do You Want to Pay And If we Offer this Price to You, Which One You Choose Between Netflix and Amazon?

ggplot(PotentialCustomers, aes(HowMuchYouWillingPayNetflixEveryMonth,fill=ChooseBetweenNetflixAndAmazon)) +geom_bar() +guides(fill=guide_legend(title = "Potential Customers -Preference Price and Choose Netflix/Amazon"))

#Most of the potential customers are willing to pay a $0-$5 monthly fee for streaming services. 
#However, for those people who answered this question, most of them prefer Amazon.