Comment by rootcage
How can we extend this to NFL or NBA?
How can we extend this to NFL or NBA?
They have this (with a slight delay) on NFL.com and ESPN. Not sure if there's a public API for it tho.
I saw it mentioned elsewhere in these comments, but plaintextsports.com is my goto for live sportsball stats
Gridiron football would probably work well for something like this: each play has a line of scrimmage, yards gained or lost, and a summary of the play (eg: from their own 47 yard- line, QB#3 threw a lateral to RB#8 with 3:08 remaining in the third quarter and gained 2 yards and was brought down by DT#10). Most importantly, there are defined "plays" that run from snap to down, which means you can summarize it.
NBA play would be very different and very difficult, because there are no defined plays, only possessions. It'd include relative locations on the floor (lane, 2pt area, 3pt area), list of players who touched the ball, and what the outcome was (2pt, 3pt, turnover, out-of-bounds, etc).