R package with datasets and functions for the fantasy football game fantasy.premierleague.com.
Here is a short blog post introducing the package. Help pages can be found here
devtools::install_github("durtal/fantasysocceR")
Name | Contents -----|-------- players| summary data for current players pastseasons| data from previous seasons players201415 | summary data for players in 2014/15 season pastseasons201415 | data for previous season from 2014/15 season season201415 | performance data for players across the 2014/15 season
Load data as normal
data(players)
The data will quickly expire as users manage their teams and interact with the game, so there are functions to collect new data, and to turn this into dataframes in the same format as the 3 above. During the off season, this function my be obsolete.
player_list <- collect_ff(n = 10, .progress = "text")
Convert player_list into players dataframe (see help page for more options)
new_players <- players_df(player_list)
?players_df
or past seasons
new_pastseasons <- pastseasons_df(player_list)
or current season data
currentseason <- currentseason_df(player_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.