papagorgio23 / bettor Goto Github PK
View Code? Open in Web Editor NEWR Package for Sports betting
Home Page: https://papagorgio23.github.io/bettoR/
License: Other
R Package for Sports betting
Home Page: https://papagorgio23.github.io/bettoR/
License: Other
There is an issue with the overtime games when scraping them from SBR. Need to fix this.
"Half" "Full" with a capitalized letter is inconsistent with everything else...
The game IDs in the get_lines() function only works for NFL. Need to fix it for other sports. Thanks
All calls I'm making to get_lines()
are returning error code 463. For example:
> bettoR::get_lines(start_date = "20210201")
Error in open.connection(x, "rb") : HTTP error 463.
This is the case running locally as well as in RStudio Cloud (happy to provide system info and loaded libraries, but I don't think those are really the issue here).
However, visiting the URL https://classic.sportsbookreview.com/betting-odds/?date=20210201 in my browser works just fine.
Would it be possible to specify the user-agent when grabbing data from SBR? It may be the case that non-browser agents are being blocked.
Hi, I have attempted your get_lines() function for the NBA, e.g.
get_lines(
+ sport = "NBA",
+ bet_type = "total",
+ period = "2Q",
+ start_date = "20191221"
+ )
and receive the error
Error in teams[[1]] : subscript out of bounds
After inspection it appears the oddsURL is outdated.
oddsURL <- glue::glue( "https://classic.sportsbookreview.com/betting-odds/{SPORT}/{TYPE}/{PERIOD}/?date={DATE}" )
I have attempted to manually fix this, but am unsuccessful.
The bankroll plot doesn't calculate the losses correctly if the betsize is anything besides 100.
Curious to know if you have considered adding functionality to not only calculate multiplicative (current default value) but also Additive, Shins, Power, etc.. There are other methods to calculate implied probability.
There are some missing games using the SBR classic site compared to the SBR new site...
First of all, the bettoR package is great and works like a charm. However, it would be helpful if rounding was added as an argument to the function. Perhaps an argument that specifies the number of decimal places or even turn off rounding all together. There are many instances where it is valuable to not round results. If you could add this functionality to all of the bettoR functions it would be extremely useful.
true_prob <-
round(implied_prob(odds = line, type = type) / sum(implied_prob(odds = odds, type = type)), 4)
fair_odds <- implied_odds(true_prob, type = type)
return(fair_odds)
}
I see that you have a clv_calc
function which calculates closing line value for a moneyline bet. Would it be possible to create a function to calculate clv for spreads and totals?
Let's use the Pacific vs. Loyola Marymount Men's College Basketball game on Jan 16, 2021 as an example. My bet was Pacific -1 (-108). My current process to calculate CLV manually is this (and boy is it slow/painful):
NCAAB
, the Bet Type is Spread
and the Odds Type is US
. Then, I enter 1.5
into Spread, -118
into Fave Price and +101
into Dog Price using the SBR Half Point Calculator.-128
and enter it into my spreadsheet for the Closing Line Odds.(55.9% - 51.9%) / 51.9%
which returns 7.8% CLV.This feels like a great opportunity for someone to calculate push probabilities and have this be incorporated into the package. I found this article helpful. If we have the push probabilities already calculated, then we could have a function like:
calculate_spread_clv <- function(my.bet.spread = NA, my.bet.price = NA, closing.spread.num = NA, fave.price = NA, dog.price = NA) {
etc
}
When this function is called, it would return the CLV. In the example provided above, it'd return 7.8%
(assuming my math is correct).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.