The following lists publicly available data sources and R
packages by sport. For a more comprehensive list, see this repository put together by Meyappan Subbaiah.
Basketball
ncaahoopr
package by Luke Benz - provides access to men’s NCAA basketball play-by-play data, along with win probability estimates.
wncaahoopR
package by Seth Berry and Scott Nestler - inspired by ncaahoopr
, this provides access to women’s NCAA basketball play-by-play data and other information.
nbastatR
package by Alex Bresler - comprehensive package for accessing NBA data such as play-by-play and shot locations.
pyball
python package by Patrick McFarlane - comprehensive python package for accessing both NBA and WNBA data similar to nbastatR
.
ballr
package by Ryan Elmore - provides easy access to stats from basketball-reference.com.
- Eight Thirty Four by Udam Singh Saini - repository of readily available NBA play-by-play csv datasets, including files with information about players on court at the possession level.
LS0tCnRpdGxlOiAiRGF0YSBTb3VyY2VzIgpvdXRwdXQ6IGh0bWxfZG9jdW1lbnQKLS0tCgpUaGUgZm9sbG93aW5nIGxpc3RzIHB1YmxpY2x5IGF2YWlsYWJsZSBkYXRhIHNvdXJjZXMgYW5kIGBSYCBwYWNrYWdlcyBieSBzcG9ydC4gRm9yIGEgbW9yZSBjb21wcmVoZW5zaXZlIGxpc3QsIHNlZSBbdGhpcyByZXBvc2l0b3J5XShodHRwczovL2dpdGh1Yi5jb20vbWV5c3ViYi9TcG9ydHNfRGF0YV9SZWZlcmVuY2UpIHB1dCB0b2dldGhlciBieSBNZXlhcHBhbiBTdWJiYWlhaC4KCiMjIEJhc2ViYWxsCgotIFtgTGFobWFuYCBwYWNrYWdlXShodHRwczovL2NyYW4uci1wcm9qZWN0Lm9yZy93ZWIvcGFja2FnZXMvTGFobWFuL2luZGV4Lmh0bWwpIC0gY29sbGVjdGlvbiBvZiB0YWJsZXMgYnVpbHQgdXNpbmcgW1NlYW4gTGFobWFuJ3MgaGlzdG9yaWNhbCBkYXRhYmFzZSBnb2luZyBiYWNrIHRvIDE4NzEhXShodHRwOi8vd3d3LnNlYW5sYWhtYW4uY29tL2Jhc2ViYWxsLWFyY2hpdmUvc3RhdGlzdGljcy8pLgotIFtgYmFzZWJhbG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