Page 1 of 1
Matchup data
Posted: Mon Nov 26, 2012 5:32 pm
by EvanZ
Since it looks like Aaron B. is no longer going to be able to continue updating his site, I had to create my own matchup files and decided to start posting them on my site. They're in JSON format, which is convenient for me since I basically just spit out the MongoDB collection I'm using to store them.
http://www.d3coder.com/thecity/matchups/
I don't expect too many people to use these, but if you do, and if you spot errors, please let me know so I can fix them.
Re: Matchup data
Posted: Tue Nov 27, 2012 11:12 am
by J.E.
Any chance that you would put these online in bbv format?
What PBP files are you using?
The most important sanity checks for the parser are probably:
- does the final score in the matchupfile match the actual final score?
- are there instances where one team has two possessions in a row?
Re: Matchup data
Posted: Tue Nov 27, 2012 12:29 pm
by mystic
J.E. wrote:
What PBP files are you using?
They are from nbc (at least that's what the json-file says as the source). The pbp is looking very clean.
http://scores.nbcsports.msnbc.com/nba/p ... final=true
Evan, nice service. As J.E. my request would be a different file format. If I'm not mistaken, exporting the data as a csv should be possible. I would appreciate that. Maybe using zip to reduce the size wouldn't be a bad idea.
Re: Matchup data
Posted: Tue Nov 27, 2012 5:44 pm
by EvanZ
I created a csv file, which actually enabled me to spot some errors. There are some incomplete matchups that I want to figure out how to fix (or why they're not being completed). When I get that figured out, I'll post the csv.
Re: Matchup data
Posted: Tue Nov 27, 2012 6:30 pm
by EvanZ
Turns out not really an error, just forgot to update the dates in my code. Anyway, if you go back to the site, you'll see a link to the CSV file.
http://www.d3coder.com/thecity/matchups/
Here's the CSV link directly from Google (this will change each time I upload a new file):
https://docs.google.com/open?id=0B16a2e ... Dk5eUR1cDA
Here's the JSON link:
https://docs.google.com/open?id=0B16a2e ... k00MUVEakE
I uploaded a zip file to Google Docs (which I'm using to host the files), but when you download the link it unzips it (why?). Sorry about that. Also, for now, the csv file does not contain the entering and exiting matchups. Since the number of players entering or exiting could vary from 0 to 5, I'd need to create 20 more columns. Just doesn't seem worth it, unless people really beg me for those. In the meantime, the json file has that information. I also added the home and away scores at the end of each stint. I know people might want the score at the beginning, so I will add that in soon as I can.
I should also note that currently the order of the players is simply alphabetical. In a future iteration I will try to order by position.
Re: Matchup data
Posted: Thu Nov 29, 2012 5:28 pm
by grapesmoker
This looks great. Is your source material the json files from nba.com?
Re: Matchup data
Posted: Thu Nov 29, 2012 5:33 pm
by EvanZ
grapesmoker wrote:This looks great. Is your source material the json files from nba.com?
Thanks. No, it's actually just scraping the play-by-play tables from nbc.com.