Reliable Play by Play Data
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Reliable Play by Play Data
Does anyone know where reliable play by play data is? I've been working with the ESPN data because it does have shot distances SOME of the time. Does anyone know a better source of reliable play by play information, or is that the best (free) source?
Re: Reliable Play by Play Data
What do you mean with "reliable"?
basketballvalue has (almost daily) updates of their PBP, but you seem to be interested in shot location, and I don't think they have that
basketballvalue has (almost daily) updates of their PBP, but you seem to be interested in shot location, and I don't think they have that
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Re: Reliable Play by Play Data
At least shot distance, yes, that's what I'm looking for.
The best freely available one I've found is ESPN but they often have shots, either makes or misses, that lack a distance...with no rhyme nor reason for why some have distance and some don't.
Basketballvalues data was the first I looked at but it lacks the distance of shots.
The best freely available one I've found is ESPN but they often have shots, either makes or misses, that lack a distance...with no rhyme nor reason for why some have distance and some don't.
Basketballvalues data was the first I looked at but it lacks the distance of shots.
Re: Reliable Play by Play Data
espn has shot distance and x,y coordinates for all shots
you have to parse it from
'http://sports.espn.go.com/nba/gamepacka ... ot?gameId=' + game_id
you have to parse it from
'http://sports.espn.go.com/nba/gamepacka ... ot?gameId=' + game_id
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Re: Reliable Play by Play Data
Tignas
That seems to be absolutely what I'm looking for (if not more)
Now I just have to figure out how to parse XML into MySQL
That seems to be absolutely what I'm looking for (if not more)
Now I just have to figure out how to parse XML into MySQL

Re: Reliable Play by Play Data
i use python with BeautifulSoup, it is quite simple to do
Code: Select all
import urllib2
import urllib
from BeautifulSoup import BeautifulStoneSoup
def get_shot_cord(game_id):
"""
Import Shot Coordinates for game_id
"""
shot_url = 'http://sports.espn.go.com/nba/gamepackage/data/shot?gameId=%s' % (game_id)
result = urllib2.urlopen(shot_url)
body = BeautifulStoneSoup(result)
shots = body.findAll('shot')
for shot in shots:
print shot
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Re: Reliable Play by Play Data
Oh, I have no doubt that it's easy to do, I just don't know perl or python yet - i mostly work with PHP and MySQL 
Thanks though - this helps immensely - i wonder what other tricky things ESPN is hiding on their web site.

Thanks though - this helps immensely - i wonder what other tricky things ESPN is hiding on their web site.
Re: Reliable Play by Play Data
simplexml for php is pretty good. if you're interested in what espn/other websites are 'hiding' from you, i'd recommend using firebug. you can see what requests are made and figure out the data source from there, making it easier to retrieve the data you're looking for
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Re: Reliable Play by Play Data
I've used firebug a bit but didnt' know it could do that. I have done mlb pitchFX downloading but I've used established modules, never built my own, so sounds like I'm taking on a big project maybe 

Re: Reliable Play by Play Data
I want to back-test an NBA half-time betting strategy, but I haven’t been able to find the necessary data from the usual data providers. What I need is at least a couple years of NBA half-time totals (over/under) LINES data including the half time score and the second half score. Any idea where I can find that data? Tks.
-
- Posts: 21
- Joined: Wed Feb 15, 2012 2:16 am
Re: Reliable Play by Play Data
I don't know where you can get betting lines - but i know where you can get half time scores
nba stuffer provides team box scores for every game including quarter by quarter scoring - i did not buy it yet for this past shortened season but i did create a database to track a bunch of things and kept the quarter by quarter scoring so i could provide you half time scores...I don't know where to find the lines though - sorry
nba stuffer provides team box scores for every game including quarter by quarter scoring - i did not buy it yet for this past shortened season but i did create a database to track a bunch of things and kept the quarter by quarter scoring so i could provide you half time scores...I don't know where to find the lines though - sorry