CNN/SI Play-by-Play NBA Data Feed

Home for all your discussion of basketball statistical analysis.
Post Reply
Eternal
Posts: 62
Joined: Sun Nov 11, 2012 11:35 pm
Location: San Diego, CA
Contact:

CNN/SI Play-by-Play NBA Data Feed

Post by Eternal »

Added to my public basketball GitHub - a web scraper to pull the very detailed CNN/SI NBA data feed. These are recap, boxscore and play-by-play JSON files; the play-by-play data includes (x,y) shot coordinates. Enjoy!

https://github.com/galizur/basketball-public

-Chris
Eternal
Posts: 62
Joined: Sun Nov 11, 2012 11:35 pm
Location: San Diego, CA
Contact:

Re: CNN/SI Play-by-Play NBA Data Feed

Post by Eternal »

Here are some samples.

http://data.sportsillustrated.cnn.com/j ... score.json

http://data.sportsillustrated.cnn.com/j ... yplay.json

To locate hidden files like these you can use e.g. Chrome's "Inspect Element" feature (Firefox has something similar) and observe which files are going across the network.

-Chris
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: CNN/SI Play-by-Play NBA Data Feed

Post by boooeee »

Very nice. It looks like the json files are only available for the current season. Is that your understanding?
Eternal
Posts: 62
Joined: Sun Nov 11, 2012 11:35 pm
Location: San Diego, CA
Contact:

Re: CNN/SI Play-by-Play NBA Data Feed

Post by Eternal »

boooeee wrote:Very nice. It looks like the json files are only available for the current season. Is that your understanding?
Yes, I've tried to pull JSON files for the previous years but no luck.

I've decompiled the Shockwave client that CBS uses; with some more work I should be able work out how to pull XML or JSON files from them.

-Chris
ballclub
Posts: 9
Joined: Tue May 15, 2012 5:56 am

Re: CNN/SI Play-by-Play NBA Data Feed

Post by ballclub »

Eternal wrote:Here are some samples.

http://data.sportsillustrated.cnn.com/j ... score.json

http://data.sportsillustrated.cnn.com/j ... yplay.json

To locate hidden files like these you can use e.g. Chrome's "Inspect Element" feature (Firefox has something similar) and observe which files are going across the network.

-Chris
Good stuff. Thanks. I was curious if you have a scraper for getting data from data.nba.com, or how I'd go about getting a developer to modify what you have built for getting data from data.nba.com? (I'm not a techie).
Eternal
Posts: 62
Joined: Sun Nov 11, 2012 11:35 pm
Location: San Diego, CA
Contact:

Re: CNN/SI Play-by-Play NBA Data Feed

Post by Eternal »

ballclub wrote: Good stuff. Thanks. I was curious if you have a scraper for getting data from data.nba.com, or how I'd go about getting a developer to modify what you have built for getting data from data.nba.com? (I'm not a techie).
There's a hidden JSON data feed from nba.com, as I mentioned in a previous message. I've gone ahead and written a scraper to pull this data, which appears to go back a number of years.

It will appear here once I've finished scraping the data. Warning, the CSV files contain JSON objects.

https://github.com/galizur/basketball-p ... master/nba

-Chris
ballclub
Posts: 9
Joined: Tue May 15, 2012 5:56 am

Re: CNN/SI Play-by-Play NBA Data Feed

Post by ballclub »

Thanks a bunch! I'll let you know (or someone else I know) if we have any follow-up questions. Thanks again.
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: CNN/SI Play-by-Play NBA Data Feed

Post by boooeee »

Eternal - Are you aware of any play by play json feeds for NCAA Basketball? CNN/SI has the box scores in the same format as the NBA, but no play by play data unfortunately.
Post Reply