knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Throner is an R API wrapper for Throne.ai sports prediction contests.
devtools::install_github("martj42/throner")
The following functions are implemented:
auth
: initialize necessary environment variablesget_competitions
: lists all available competitionsget_results
: receive results for selected competitionget_stats
: receive statistics for games in selected competitionget_lineups
: receive lineups for games in selected competitionget_players
: lists player names and positions to match the ids in get_lineups
get_fixtures
: receive fixtures available for prediction for selected competitionsubmit_predictions
: submit your predictions for selected competitionget_xp
: get your xp balancelibrary(throner) auth("martj42", "f08dfrh2-we21-4520-b000-b49a0f4h4aea") competitions <- get_competitions() epl_results <- get_results("English Premier League") epl_stats <- get_stats("English Premier League") epl_lineups <- get_lineups("English Premier League") epl_players <- get_players("English Premier League") epl_fixtures <- get_fixtures("English Premier League") epl_predictions <- your_awesome_model(epl_fixtures) submit_predictions(epl_predictions, "English Premier League") get_xp()
Please note that due to throttling limits you should SAVE your historical and competition data rather than reloading from Throne servers each time you run a script or a notebook.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.