knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(eplR)
The eplR
package comes with a built in dataset for 17 seasons of English Premier League (soccer) games. They are from 2002/2003 to 2018/2019. To call on the dataset just use call eplData
. The format of eplData
is a list of dataframes so to get the dataframe for 2009/2010 season use the following code:
# Get Data for season 2009/2010 head(eplData[[8]])
For an easier version to query the data. You can use the getData()
function. This function allows you to specify the season, whether you want additional betting information and whether you only want to have season data for a specific team.
# Query Data head(getData(1617, bet = FALSE, team = "Liverpool"))
For users who are interested in analysing the season statistics for referees, you can use the referee()
function, which will output a specialized query for referee-related information.
# Get Referee stats for 2013-2014 season head(referee(1314))
To get summary statistics for a particular team during a particular season, use the teamData()
function.
teamData(1112, "Wolves")
To visualize the performance of a team over the course of a particular season, use the teamPerformance()
function.
# Look at the performance of Man City and Man United in the 2018-2019 season teamPerformance(1819, "Man City") teamPerformance(1819, "Man United")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.