README.md

eplR

The goal of eplR is to make it easy for any user of R to access and analyze data from the English Premier League (soccer). The package provides R functions that simplify and expedite common tasks for studying match, referee and betting statistics in the league.

Installation

You can install the released version of eplR from Github with:

# Install eplR from Github
if (!require("devtools")) {
  install.packages("devtools")
}
devtools::install_github("gl2668/eplR")
library(eplR)

Usage

Data that comes with the package

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 2002/2003 season use the following code:

# Get Data for season 2002/2003
eplData[[1]]

Specific Data Query

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
getData(1617, bet = FALSE, team = "Liverpool")

Referee Data

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
referee(1314)

Team Data

To get summary statistics for a particular team during a particular season, use the teamData() function.

teamData(1112, "Wolves")

Team Performance

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")


gl2668/eplR documentation built on Dec. 18, 2019, 2:34 a.m.