Giter Site home page Giter Site logo

eplr's Introduction

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

eplr's People

Contributors

gl2668 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.