Page 1 of 1
Reliable Play by Play Data
Posted: Wed Feb 15, 2012 2:18 am
by JohnHasADHD
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
Posted: Wed Feb 15, 2012 11:41 am
by J.E.
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
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 3:20 pm
by JohnHasADHD
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.
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 3:44 pm
by tignas
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
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 3:49 pm
by JohnHasADHD
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

Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 4:01 pm
by tignas
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
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 4:20 pm
by JohnHasADHD
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.
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 4:53 pm
by tignas
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
Re: Reliable Play by Play Data
Posted: Wed Feb 15, 2012 5:12 pm
by JohnHasADHD
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
Posted: Sun Jun 03, 2012 3:32 am
by donk
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.
Re: Reliable Play by Play Data
Posted: Wed Jun 06, 2012 2:36 am
by JohnHasADHD
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