Giter VIP home page Giter VIP logo

fplr's Introduction

fplr

Build Status lifecycle

Overview

fplr makes it quick ‘n’ easy to retrieve Fantasy Premier League (FPL) data programmatically, then work with it, all from R.

Installation

Get the latest development version of fplr from GitHub.

# install.packages("remotes")
remotes::install_github("ewenme/fplr")

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

Usage

Refer to the quickstart guide to get started. Still, here are some very basic examples of the functionality and practical applications of fplr.

Get data

…on all players in the current FPL season.

library(fplr)

players <- fpl_get_player_all()

players
#> # A tibble: 628 x 61
#>    chance_of_playi… chance_of_playi…   code cost_change_eve… cost_change_eve…
#>               <int>            <int>  <int>            <dbl>            <int>
#>  1              100              100  69140                0                0
#>  2              100              100  98745                0                0
#>  3               75               75 111457                0                0
#>  4              100              100 154043                0                0
#>  5              100              100  39476                0                0
#>  6                0                0  38411                0                0
#>  7                0                0  51507                0                0
#>  8                0                0 233963                0                0
#>  9                0                0  80254                0                0
#> 10              100              100 156074                0                0
#> # … with 618 more rows, and 56 more variables: cost_change_start <dbl>,
#> #   cost_change_start_fall <int>, dreamteam_count <int>, element_type <int>,
#> #   ep_next <dbl>, ep_this <dbl>, event_points <int>, first_name <chr>,
#> #   form <dbl>, id <int>, in_dreamteam <lgl>, news <chr>, news_added <chr>,
#> #   now_cost <dbl>, photo <chr>, points_per_game <dbl>, second_name <chr>,
#> #   selected_by_percent <dbl>, special <lgl>, squad_number <lgl>, status <chr>,
#> #   team <int>, team_code <int>, total_points <int>, transfers_in <int>,
#> #   transfers_in_event <int>, transfers_out <int>, transfers_out_event <int>,
#> #   value_form <dbl>, value_season <dbl>, web_name <chr>, 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>, influence_rank <int>, influence_rank_type <int>,
#> #   creativity_rank <int>, creativity_rank_type <int>, threat_rank <int>,
#> #   threat_rank_type <int>, ict_index_rank <int>, ict_index_rank_type <int>

In-the-wild

…xPoints?

Collaborators

If you want to contribute to the package, try and follow:

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.

fplr's People

Contributors

ewenme avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fplr's Issues

fpl_get_fixtures error

fpl_get_fixtures() gives me the following error:

Error in open.connection(con, "rb") : HTTP error 503.

Players data column details

Hi there,

This is not really a technical issue so I'm not sure if this is the right place to ask this.

Thank you for this. It works great! I just have a few questions about the players data.

Where can I find explanations for columns in the players data frame. For example, I assume "ep next" is expected points in next game week. How was this calculated?

Also, I'm not sure what is "element type", the difference between "team" and "team code", etc.

Is there a file that explains this?

Also, will this data frame be updated after every game week?

thanks again

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.