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:

library(fplscrapR)
library(dplyr)
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


wiscostret/fplscrapR documentation built on June 12, 2022, 8:03 a.m.