Chapter 4 Tags and Percentage

Data Visualization and EDA are the top most Tag contributors for the hidden gems. Jonathan Bouchet and Ramshankar Yadhunath have data visualization and eda as their most popular tags. Vopani’s popular tags include beginner , tpu , tensorflow. Bojan Tunguz’s most popular tags include gpu , xgboost

TotalNoOfRows = nrow(kernels_gems_tags)
p1 <- kernels_gems_tags %>%
  group_by(Slug) %>%
  summarise(Percentage = n()/TotalNoOfRows *100) %>%
  arrange(desc(Percentage)) %>%
  head(10) %>%
  ungroup() %>%
  mutate(Slug = reorder(Slug,Percentage))

p1 %>%
  filter(!is.na(Slug)) %>%
  mutate(foo = Percentage > 9 ) %>%
  ggplot(aes(x = Slug,y = Percentage, fill = foo )) +
  geom_bar(stat='identity',colour="white")  +
  scale_fill_manual(values = c(fillColor2,fillColor)) + 
  geom_text(aes(x = Slug, y = 1, 
                label = paste0("( ",round(Percentage,2)," %)",sep="")),
            hjust=0, vjust=.5, size = 6, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Slug', 
       y = 'Percentage', 
       title = 'Tags and Percentage') +
  guides(fill=guide_legend(title="Tags Percentage")) +
  coord_flip() + 
  theme_fivethirtyeight(base_size = 15) +
  theme(legend.position = "none") 

4.1 Jonathan Bouchet Tags

getTagsAuthor <- function(author) {
  kernels_gems_tags_jb = kernels_gems_tags %>%
    filter(author_name == author)
  
  TotalNoOfRows = nrow(kernels_gems_tags_jb)
  
  p1 <- kernels_gems_tags_jb %>%
    group_by(Slug) %>%
    summarise(Percentage = n()/TotalNoOfRows *100) %>%
    arrange(desc(Percentage)) %>%
    head(10) %>%
    ungroup() %>%
    mutate(Slug = reorder(Slug,Percentage))
  
  p1 %>%
    filter(!is.na(Slug)) %>%
    mutate( foo = Percentage > 10 ) %>%
    ggplot(aes(x = Slug,y = Percentage, fill = foo )) +
    geom_bar(stat='identity',colour="white") +
    scale_fill_manual(values = c(fillColor2,fillColor)) +
    geom_label(aes(label = paste0("( ",round(Percentage,2)," %)",sep=""))) + 
    labs(x = 'Slug', 
         y = 'Percentage', 
         title = 'Tags and Percentage') +
    guides(fill=guide_legend(title="Tags Percentage")) +
    coord_flip() + 
    theme_fivethirtyeight(base_size = 15) +
    theme(legend.position = "none") 
}

getTagsAuthor("Jonathan Bouchet")

4.2 Ramshankar Yadhunath Tags

getTagsAuthor("Ramshankar Yadhunath")

4.3 Vopani Tags

getTagsAuthor("Vopani")

4.4 Bojan Tunguz Tags

getTagsAuthor("Bojan Tunguz")