[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
 
Game Logs Database from Retrosheet Game Log Files
Posted: 29 November 2016 11:56 AM
Singles Hitter
Rank
Total Posts:  2
Joined  2016-11-18

I was hoping that someone could help me with a little problem I’m running into.

I’m trying to get a database of Game Logs from the Retrosheet data.  I figure most people here probably have this database.  I already have a play by play database and that has a “games” table in it but I think the game logs have more information.  Here’s what I’ve done so far.  I pretty much followed the steps in the Joseph Adler book Baseball Hacks.

1) I’ve downloaded all of the game log files from Retrosheet
2) I used the following site https://www.doyler.net/stealing-first/importing-retrosheet-game-logs to create the games table.
3) I copied all of the game log txt files into one big txt file.
4) I tried importing that file into the database.

So I go into MySQL and the games table is populated with data, however if I run a query on year, I only get 1,215 results.  For some reason, I only seem to be getting half the data.  If I look at the actual text file, the missing data is in the file.

I’m a bit of a novice and just beginning to learn but any help would be greatly appreciated.

Profile
 
Posted: 30 November 2016 07:02 PM   [ # 1 ]
Administrator
RankRankRankRank
Total Posts:  383
Joined  2013-01-04

I don’t know where your errors go if the load fails.  But my first suggestion is to look at the first row that didn’t load and see if there are letters where it expects numbers or dates.

If that doesn’t work, then change your table structure so that it is ALL char, no ints.  Then load the data.  If you get all the data, then you know you have a data type issue.

Profile
 
Posted: 01 December 2016 04:48 PM   [ # 2 ]
Singles Hitter
Rank
Total Posts:  2
Joined  2016-11-18

Figured it out.

Apparently some of the table columns had the wrong structure type.

Thanks

Profile