- Notifications
You must be signed in to change notification settings - Fork4
Access sports odds from the Odds API
License
Unknown, MIT licenses found
Licenses found
sportsdataverse/oddsapiR
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
To access the API, get a free API key fromhttps://the-odds-api.com
Installation & Usage
You can install the released version ofoddsapiR fromGitHub with:
# You can install using the pacman package using the following code:if (!requireNamespace('pacman',quietly=TRUE)){ install.packages('pacman')}pacman::p_load_current_gh("sportsdataverse/oddsapiR")
# if you would prefer devtools installationif (!requireNamespace('devtools',quietly=TRUE)){ install.packages('devtools')}# Alternatively, using the devtools package:devtools::install_github(repo="sportsdataverse/oddsapiR")
gitclonehttps://github.com/sportsdataverse/oddsapicdoddsapiRscript-e"devtools::install()"
TheOdds API requires an API key, here’s aquick run-down:
- Using the key: You can save the key for consistent usage by adding
ODDS_API_KEY=XXXX-YOUR-API-KEY-HERE-XXXXXto your .Renviron file(easily accessed viausethis::edit_r_environ()).Runusethis::edit_r_environ(),a new script will pop open named.Renviron,THEN paste thefollowing in the new script that pops up (without quotations)
ODDS_API_KEY=XXXX-YOUR-API-KEY-HERE-XXXXX
Save the script andrestart your RStudio session, by clickingSession (in betweenPlots andBuild) and clickRestart R (therealso exists the shortcutCtrl + Shift + F10 to restart your session).If set correctly, from then on you should be able to use any of thefunctions without any other changes.
- For less consistent usage: At the beginning of every session orwithin an R environment, save your API key as the environmentvariable
ODDS_API_KEY(with quotations) using a command like thefollowing.
Sys.setenv(ODDS_API_KEY="XXXX-YOUR-API-KEY-HERE-XXXXX")
For more information on the package and function reference, please seetheoddsapiR documentationwebsite.
Follow theSportsDataverse on Twitter and star this repo
To cite theoddsapiR Rpackage in publications, use:
BibTex Citation
@misc{gilani_2022_oddsapiR,author ={Gilani, Saiem},title ={oddsapiR: The SportsDataverse's R Package for The Odds API.},url ={https://oddsapiR.sportsdataverse.org},year ={2022}}
About
Access sports odds from the Odds API
Topics
Resources
License
Unknown, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
