An R package that provides a compendium of tools for working with Fantasy Premier League (FPL) data in R.

Because of the lack of dev support from FPL and possible API changes, the package is unlikely to be submitted to CRAN and will stay in an experimental lifecycle for the foreseeable future.

Installation

Get the development version from GitHub.

Usage

FPL Mythbusting with fplr

Player data

Get data on all players in the current FPL season:

fplr::fpl_get_players()
## # A tibble: 608 x 60
##       id photo web_name team_code status   code first_name second_name
##    <int> <chr> <chr>        <int> <chr>   <int> <chr>      <chr>      
##  1     1 1133… Cech             3 Avail…  11334 Petr       Cech       
##  2     2 8020… Leno             3 Avail…  80201 Bernd      Leno       
##  3     3 5150… Kosciel…         3 Avail…  51507 Laurent    Koscielny  
##  4     4 9874… Bellerín         3 Injur…  98745 Héctor     Bellerín   
##  5     5 3841… Monreal          3 Avail…  38411 Nacho      Monreal    
##  6     6 1560… Holding          3 Injur… 156074 Rob        Holding    
##  7     7 6914… Mustafi          3 Avail…  69140 Shkodran   Mustafi    
##  8     8 1114… Kolasin…         3 Avail… 111457 Sead       Kolasinac  
##  9    10 2339… Mavropa…         3 Avail… 233963 Konstanti… Mavropanos 
## 10    11 2733… Lichtst…         3 Avail…  27335 Stephan    Lichtstein…
## # … with 598 more rows, and 52 more variables: squad_number <int>,
## #   news <chr>, now_cost <dbl>, news_added <chr>,
## #   chance_of_playing_this_round <int>,
## #   chance_of_playing_next_round <int>, value_form <dbl>,
## #   value_season <dbl>, cost_change_start <dbl>, cost_change_event <dbl>,
## #   cost_change_start_fall <int>, cost_change_event_fall <int>,
## #   in_dreamteam <lgl>, dreamteam_count <int>, selected_by_percent <dbl>,
## #   form <dbl>, transfers_out <int>, transfers_in <int>,
## #   transfers_out_event <int>, transfers_in_event <int>, loans_in <int>,
## #   loans_out <int>, loaned_in <int>, loaned_out <int>,
## #   total_points <int>, event_points <int>, points_per_game <dbl>,
## #   ep_this <dbl>, ep_next <dbl>, special <lgl>, minutes <int>,
## #   goals_scored <int>, assists <int>, clean_sheets <int>,
## #   goals_conceded <int>, own_goals <int>, penalties_saved <int>,
## #   penalties_missed <int>, yellow_cards <int>, red_cards <int>,
## #   saves <int>, bonus <int>, bps <int>, influence <dbl>,
## #   creativity <dbl>, threat <dbl>, ict_index <dbl>, ea_index <int>,
## #   element_type <int>, team <int>, team_name <chr>, position <chr>

Collaborators

If you want to contribute to the package:

  • I followed the principles in Hadley Wickham’s R packages book
  • Follow the GitHub fork/pull request model, or contact me directly

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.