Chapter 25 Simona Halep

The table shows the title wins by Simona Halep.

simona_title_wins = matches %>% 
  filter(winner_name == "Simona Halep") %>%
  filter(round == "F") %>%
  arrange(desc(year)) %>%
  select(winner_rank,tourney_name,tourney_level,surface,year,loser_name,loser_rank)

kable(simona_title_wins,"html") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive")) %>%
  scroll_box(width = "800px")
winner_rank tourney_name tourney_level surface year loser_name loser_rank
8 Madrid P Clay 2017 Kristina Mladenovic 17
7 Madrid P Clay 2016 Dominika Cibulkova 38
5 Bucharest I Clay 2016 Anastasija Sevastova 66
5 Montreal I Hard 2016 Madison Keys 12
3 Shenzhen I Hard 2015 Timea Bacsinszky 47
4 Dubai Open P Hard 2015 Karolina Pliskova 18
3 Indian Wells PM Hard 2015 Jelena Jankovic 21
10 Doha P Hard 2014 Angelique Kerber 9
3 Bucharest I Clay 2014 Roberta Vinci 24
58 Nuremberg I Clay 2013 Andrea Petkovic 103
45 ’s Hertogenbosch I Grass 2013 Kirsten Flipkens 20
30 Budapest I Clay 2013 Yvonne Meusburger 112
23 New Haven P Hard 2013 Petra Kvitova 9
18 Moscow P Hard 2013 Samantha Stosur 19
14 Tournament of Champions P Hard 2013 Samantha Stosur 19

The wins for each of the surfaces are also shown in the following bar plot.

simona_title_wins %>%
group_by(surface) %>%
  summarise(Count = n()) %>%
  arrange(desc(Count)) %>%
  ungroup() %>%
  mutate(surface = reorder(surface,Count)) %>%
  head(10) %>%
 
  ggplot(aes(x = surface,y = Count)) +
  geom_bar(stat='identity',colour="white",fill=fillColor2) +
  geom_text(aes(x = surface, y = 1, label = paste0("(",Count,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Surface Wins by Simona Halep', 
       y = 'Count', 
       title = 'Surface Wins by Simona Halep') +
  coord_flip() + 
  theme_bw()