Chapter 5 Performance Tier and Gems
Experts [ 28% ] followed by Masters [ 25% ] contribute most of the Hidden Gems.Grand Masters [ 18% ] and Contributors [ 18% ] follow next. The Novice Tier and the Kaggle Team has also contributed to the Gems
TotalNoOfRows <- nrow(gems_users)
PerformanceTier <- c(NA,0,1,2,3,4,5)
PerformanceTier_Name <- c("NoTier","Novice","Contributor","Expert","Master","GrandMaster","KaggleTeam")
df_Performance_Tier <-data.frame(PerformanceTier, PerformanceTier_Name)
gems_user_performance <- inner_join(gems_users,df_Performance_Tier)
p1 <- gems_user_performance %>%
group_by(PerformanceTier_Name) %>%
summarise(Percentage = n()/TotalNoOfRows *100) %>%
arrange(desc(Percentage)) %>%
ungroup() %>%
mutate(PerformanceTier_Name = reorder(PerformanceTier_Name,Percentage))
p1 %>%
filter(!is.na(PerformanceTier_Name)) %>%
ggplot(aes(x = PerformanceTier_Name,y = Percentage, fill = (PerformanceTier_Name) )) +
geom_bar(stat='identity',colour="white") +
geom_label(aes(label = paste0("( ",round(Percentage,2)," %)",sep=""))) +
labs(x = 'Performance Tier',
y = 'Percentage',
title = 'Performance Tier and Percentage') +
coord_flip() +
theme_fivethirtyeight(base_size = 15) +
theme(legend.position = "none") 