vignettes/dgw32ppms.Rmd
dgw32ppms.Rmd
Suppose we are interested in the top options from ’18/19, measured by FPL points per 90 mins (pp90)?
With fplscrapR, we can do that just a few lines of code:
df <- get_player_info(season=18) df %>% filter(total_points >= 30) %>% # filtering for players with more than 30 points scored mutate(pp90 = total_points / minutes * 90) %>% # creating the 'pp90' variable select(playername,pp90) %>% # selecting player name and pp90 for our table arrange(-pp90) %>% # ordering (arranging) by pp90 slice(1:20) # showing just the top20
## playername pp90
## 1 Divock Origi 7.912088
## 2 Raheem Sterling 7.602888
## 3 Leroy Sané 7.560582
## 4 Xherdan Shaqiri 7.528517
## 5 Sergio Agüero 7.362637
## 6 Eden Hazard 7.340644
## 7 Ruben Loftus-Cheek 7.255102
## 8 Mohamed Salah 7.163491
## 9 Heung-Min Son 7.038859
## 10 Gabriel Fernando de Jesus 6.991150
## 11 Riyad Mahrez 6.897070
## 12 Anthony Martial 6.807192
## 13 Pierre-Emerick Aubameyang 6.778104
## 14 Trent Alexander-Arnold 6.768293
## 15 Sadio Mané 6.758778
## 16 Lucas Pérez 6.387097
## 17 Ivan Cavaleiro 6.381093
## 18 Erik Lamela 6.248705
## 19 Aaron Ramsey 6.209249
## 20 Daniel Sturridge 6.144578