2009 is out, and the database is disassembled by decade for the 1950′s, 1960′s, 1970′s, 1980′s, 1990′s, and 2000′s. You can also download the full thing also. Check out the links below.
Please help me with my bandwidth costs or just buy me a beer.
I have compiled the Retrosheet Baseball Data into a mysql database using Tangotiger.net’s Wiki. I was asked to do this for my brother, and I figured that the rest of the baseball community might not want have a brother as technically savvy. Please feel free to download the 400 MB file in .gz format. I am a Linux man sorry all you people wanting zip there are plenty of programs that will allow you to extraxt .gz file. Once you unzip the file from it’s 400 MB size to it’s 4.9 GB flat file size you will need to import it with the following command.
mysql -uusername -ppassword -hlocalhost retrosheet < retrosheet.sql
Or something of that nature depending on your setup.
I am allowing you to download this database for free with the asking that you help my bandwidth cost by donating below.
Click Here to download the Full Retrosheet database .
Click Here to download the 1950′s Retrosheet database.
Click Here to download the 1960′s Retrosheet database.
Click Here to download the 1970′s Retrosheet database.
Click Here to download the 1980′s Retrosheet database.
Click Here to download the 1990′s Retrosheet database.
Click Here to download the 2000′s Retrosheet database.
Check out my Pitch FX download page also.
#1 by Ben on December 9, 2009 - 12:20 am
This doesn’t include 2009, does it? Will you be adding that anytime soon? Thanks!
#2 by Darrell on December 14, 2009 - 9:06 am
2009 should be up before the 1st of the year. they released the new data but have errors so I am waiting.
#3 by Nick Steiner on December 22, 2009 - 6:52 pm
Darrel, I love you.
#4 by Derek Carty on January 3, 2010 - 5:44 pm
This is awesome, Darrell. Have you posted an explanation file for the fields that aren’t in the usual Retrosheet files? Fields 97 and beyond? I can guess at some of them but others I’m not entirely sure about.
Thanks!
#5 by Darrell on January 4, 2010 - 6:02 am
I will have to get my brother to look into this for you. He uses the database, I just make the bastard child.
#6 by Derek Carty on January 8, 2010 - 2:47 pm
Thanks, Darrell.
#7 by Derek Carty on January 8, 2010 - 8:48 pm
Found it, Darrell. Never mind, and thanks again for putting this together.
http://chadwick.sourceforge.net/chapter1.html#cwevent-expanded-event-descriptor
#8 by Rich on January 3, 2010 - 10:59 pm
I recently insalled mysql 5.1 and am attempting to run the command to import the SQL script, however I keep getting an error using the syntax above. My database is called “baseball” and I’m using the root userid. Any help in importing would be greatly appreciated.
#9 by Darrell on January 4, 2010 - 6:18 am
Rich,
The top 20 lines of the retrosheet file has a USE ‘retrosheet’ line. You need to change that to ‘baseball’ or remove it all together and put baseball in your connection string. The file is huge so this might not be the best way. 4 GB in notepad doesn’t fly. It is a pain in VI also.
mysql -uusername -ppassword -hlocalhost baseball < retrosheet.sql
The other way of doing it is to import the entire database as retrosheet database. When it is done turn off the mysql database and copy the database directory from retrosheet to baseball. Start mysql, and connect to it with your favorite editor. If the database baseball is there drop database retrosheet. Seems like few steps, but I do it this way when playing around with it.
Darrell
#10 by Rich on January 4, 2010 - 11:37 am
Good to know. I dropped the baseball database and created the retrosheet database.
So here is the syntax I’m using for the import:
mysql -uroot -pmahler -hlocalhost retrosheet < retrosheet.sql
The sql is saved on my C: drive and in the bin folder where mysql.exe is stored.
Still getting a syntax error. Can you see the error in my command line? If not, I wonder if it's my install.
Thanks!
#11 by Stephen Varga on February 3, 2010 - 5:44 pm
Thanks a lot for this, really awesome! I am doing a thesis project that uses this data and I’m really excited not to have to recompile all this again with the 2009 data. Is playoff data included in your database?
#12 by David Pinto on March 10, 2010 - 12:17 pm
Darrell,
I have through 2008 loaded on my machine. Is there a way of just loading 2009 data into the existing MySQL database?
#13 by Darrell on March 10, 2010 - 6:20 pm
I could get you the 2009 csv files for each table to import if that will work for you?
#14 by David Pinto on March 10, 2010 - 6:30 pm
Yes, that would be great. If you want you can zip them and mail them to pinto@baseballmusings.com.
Thanks!
#15 by Susan on June 9, 2010 - 11:36 pm
http://www.brokeshields.com/download.php?file=2010_06_08.zip
How do you put current game data into table format that can be used in Excel?