Company X Market Share

sum(company$`Company X Sales Volumes`)/sum(market$`Market Size (Volume)`) * 100 
## [1] 11.17701

Company X’s market share is 11.17%.

Company X Focus Segments

company <- company %>% separate(Quarter, c("Year", "Quarter"), sep = "Q")
company$Quarter = as.factor(company$Quarter)
company$`Price Band` = as.factor(company$`Price Band`)

company %>% group_by(`Product Category`) %>% summarise(sv = sum(`Company X Sales Volumes`))%>% ggplot(aes(x=`Product Category` ,y=sv, fill=`Product Category`)) + geom_bar(position='dodge', stat='identity') + geom_text(aes(label=sv), position=position_dodge(width=0.9), vjust=-0.25, size =3,check_overlap = TRUE) + labs(x="Product", y="Market Size (Volume)",title="Total Company X Sales Volumes per Product")

company %>% group_by(Year, `Product Category`) %>% summarise(sv = sum(`Company X Sales Volumes`))%>% ggplot(aes(x=Year ,y=sv, fill=`Product Category`)) + geom_bar(position='stack', stat='identity') + labs(x="Year", y="Company X Sales Volumes",title="Share of Company X Sales Volumes by Product for every Year")

kable(company %>% group_by(`Product Category`, `Price Band`) %>% tally(), caption = "Company X Price Band distribution per Product Category") 
Company X Price Band distribution per Product Category
Product Category Price Band n
Feature Phone $0-$100 19
Feature Phone $101-$200 19
Feature Phone $201-$300 16
Smartphone $0-$100 19
Smartphone $101-$200 19
Smartphone $201-$300 19
Smartphone $301-$400 19
Smartphone $401-$500 19
Smartphone $501-$600 19
Smartphone $601+ 19

Company X should focus on increasing their smartphone sales and the higher price band feature phones.