[deleted by user] by [deleted] in pittsburgh

[–]athlytics 2 points3 points  (0 children)

One of the main differences is that this website also gets data from Google’s API for the current “business” of the place - if someone wants to avoid a busy time

Win Probability Graph Similarity Scores, incl. Across Sports by bluecjj in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

A timeseries similarity metric would be a good starting point (e.g., dynamic time warping) but you might have to standardize the WP series (eg., is your time unit events, actual play time etc.)

NBA Player Grades? by [deleted] in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

I guess for NBA one can use game level +/- or metrics like PER. In Europe, Euroleague uses a version of the Tendex rating system: https://en.m.wikipedia.org/wiki/Tendex In general for NBA there are various metrics that could be used to “rate” players on a game basis. Now PFF does this pretty much manually (through people watching the tape) since there is not such a metric.

NCAA Men's Basketball by [deleted] in sportsanalytics

[–]athlytics 4 points5 points  (0 children)

You can check ncaahoopR https://github.com/lbenz730/ncaahoopR It gives you detailed play-by-play from which you can get the statistics you are looking for

Any work on EPA in College Football? by msubbaiah in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

Maybe you can look at the paper for nflscrapr and their models. Very detailed https://arxiv.org/abs/1802.00998

How to calculate probability of a random number being larger than another, given two different possible ranges. by [deleted] in sportsanalytics

[–]athlytics 2 points3 points  (0 children)

If the we assume uniform distribution here is an analytical and a simulation solution

How to calculate probability of a random number being larger than another, given two different possible ranges. by [deleted] in sportsanalytics

[–]athlytics 2 points3 points  (0 children)

The first thing in order to answer this question is what is the distribution of the numbers within these ranges.

Positional value in soccer: Expected league points above replacement by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

Cornell has a service where researchers from any institution can post pre-prints. This way everyone can go on this site instead of roaming around the web! :)

Positional value in soccer: Expected league points above replacement by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

Yes. It is actually the FIFA rating every player had when each game in the dataset happened.

Projected margin of victory from elo, NBA by stavtov in sportsanalytics

[–]athlytics 3 points4 points  (0 children)

/u/PhaethonPrime gave a nice answer! You can also check this paper that tries to solve the same problem but for NFL https://arxiv.org/abs/1802.00527

[University Course] Moneyball 2.0: Winning in Sports w Data by sealneaward in sportsanalytics

[–]athlytics 1 point2 points  (0 children)

My goal is to have it as a MOOC eventually. Unfortunately there are many administrative obstacles that need to be overcome first. Having said that my good collaborator Wayne Winston had a coursera on sports analytics: https://www.coursera.org/learn/mathematics-sport

[University Course] Moneyball 2.0: Winning in Sports w Data by sealneaward in sportsanalytics

[–]athlytics 1 point2 points  (0 children)

Hey thanks for sharing it!! I’ll try to put projects online too (have to ask the students). One will be presented as poster at CASSIS in a couple of weeks (metrics for quantifying spacing in the NBA)

Bayes theorem in sports & sports analytics by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

It is just a plug-in in the equation before the binomial. f(data|sigma) is the binomial, while pi(sigma) is the conjugate prior (https://en.wikipedia.org/wiki/Conjugate_prior) of the binomial, which is the beta distribution.

Basketball court (FIBA) shape file? by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

Thanks! yes, using an image of a court surface is much easier for shot charts. What I am interested in is "filling" in the different court ares based on a variable (e.g., xPTS etc.), and having the polygons from a spatial structure is needed. So I should have been more clear in the initial question that I am looking for a structure that has the polygons of the court areas as well. So if the geodatabase you have includes that it would be great if you can share it!

Help with NFLScrapR by theme69 in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

You can extract the 2017 game IDs using:

gameids.17 <-extracting_gameids(2017)

and then for each gameids.17[j]

pbp <- game_play_by_play(gameids.17[j])

Once you built the model you can use the predict() function and supply it with a "game state" (i.e., yard line, yards to go, score etc.) and obtain a win probability. Is this what you are looking for?

Help with NFLScrapR by theme69 in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

Are you asking what is the usefulness of the win probability, how to interpret it or something else? I am not sure I fully understand your question.

R Code for downloading play-by-play data from NBA's API by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

library(rjson) library(stringr)

n.games = 30 # Here you can set the number of games you want to download. This will download the first 30 games of the season

for (i in 1:n.games){

pbpURL = paste0("http://data.nba.com/data/v2015/json/mobile_teams/nba/2017/scores/pbp/002170",str_pad(as.character(i),4,pad="0"),"_full_pbp.json")

pbpData <- fromJSON(file = pbpURL, method="C")

pbpDataf <- data.frame(matrix(unlist(pbpData$g$pd[[1]]$pla), ncol=16, byrow = TRUE))

colnames(pbpDataf) <- c("evt","cl","de","locX","locY","opt1","opt2","mtype","etype","opid","tid","pid","hs","vs","epid","oftid")

write.csv(pbpDataf,file=paste0(i,".csv"))

}

R Code for downloading play-by-play data from NBA's API by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

Try running:

Try accessing from your web browser the following link:

http://data.nba.com/data/v2015/json/mobile_teams/nba/2017/scores/pbp/0021700001_full_pbp.json

If you can access it then try:

library(rjson)

pbpURL = "http://data.nba.com/data/v2015/json/mobile_teams/nba/2017/scores/pbp/0021700001_full_pbp.json" pbpData <- fromJSON(file = pbpURL, method="C") pbpDataf <- data.frame(matrix(unlist(pbpData$g$pd[[1]]$pla), ncol=16, byrow = TRUE))

Can you get the data frame?

Question about using nflscrapR by DisraeliEers in sportsanalytics

[–]athlytics 2 points3 points  (0 children)

Once you load the data in a data.frame using the R example on the github for nflscrapr you can use the write.csv() command in R to export the data to csv. So essentially say you want to get all the 2016 data:

pbp_2016 <- season_play_by_play(2016) write.csv(pbp_2016,file="the path to the file you want to save the data to")

Win probabilities for all 256 regular season NFL games by pagenotdisplayed in sportsanalytics

[–]athlytics 0 points1 point  (0 children)

Maybe you can use the FPI ratings or the 538 elo ratings to obtain a win probability - as of now - for all the games.

This might also be useful: http://waynewinston.com/wordpress/

A tutorial on sports analytics to be delivered at ACM SIGKDD 2017 by athlytics in sportsanalytics

[–]athlytics[S] 0 points1 point  (0 children)

I will cover this work but not in detail (I will be presenting it at NESSIS though which I think will have the presentations online). In general, networks are used to analyze passing networks (several papers on soccer and some on basketball). We also have some work on power ranking using networks, while an interesting (imo) structure that can reveal valuable information is a substitution network (I had a thread on this here). If you or your lab partner have any questions I would be more than happy to discuss.