I’ve got a big update today.  Roster files (.ROS and FixedIt .CSV) are now updated for all Minor League Baseball teams on a daily basis from http://www.milb.com.  Thanks to Daniel Stenberg and the curl-and-php mailing list for the tip on using LiveHttpHeaders to get this accomplished.

If you click on “Roster Files,” you’ll notice that there are now subpages for AAA, AA, A+, A-, A, and Rookie.

Roster files for all teams are included within those pages.

Enjoy!

Retrosheet game files use a code to represent each Major League Baseball stadium.  Here is the legend for those codes.

Ballpark Codes

And because I think this blog needs some color… here is PIT08.

pncpark

This afternoon I made some modifications to the script that automatically generates the .ROS files so that the script also generates .CSV files for use with the FixedIt scoring software.  See the link above to access the .CSV files.

Also, check out http://www.fixedit.com for more information on their software.

I purchased FixedIt’s baseball scoring software, and I plan to write more about FixedIt in the future.  There are some aspects of the software that I’ve really enjoyed.  In particular, I purchased the software at a time when I was using a Palm handheld.  FixedIt has a module for Palm so I could score games live at the ballpark directly on my Palm Pilot.  Also, the graphical user interface makes it quite easy to score games using a desktop/laptop computer.

There are also several aspects of FixedIt that I dislike.  First and foremost, the program creates a gamefile that cannot be read by any piece of software except for FixedIt.  So, if you make a mistake and try to correct the mistake, but the software misinterprets your correction (which does happen a lot!), you can easily corrupt your entire game file.  My desire is for a piece of scoring software to generate a text file (preferably in Project Scoresheet format!) that can easily be decrypted by a human or any piece of Project Scoresheet compatible software.  Additonally, one of the key reasons that I purchased FixedIt was because they promised free upgrades for life.  I’ve seen very few upgrades in the four years that I’ve owned FixedIt.

Still, I do like the software, and I score games with it every now and then.  So, I like to keep the MLB rosters active so that anybody else who uses FixedIt has them at easy access.  Enjoy!

FixedIt .CSV files contain generally the same information as the .ROS files, just in a different format.  Below is an excerpt of the current .CSV roster file for the Arizona Diamondbacks.

Arizona Diamondbacks,,,,,
Manager,Bob Melvin,,,,
#,Name,Pos,BO,Bats,Throws
0,Travis Blackley,P,0,LH,LH
33,Billy Buckner,P,0,RH,RH
0,Jonathan Coutlangus,P,0,LH,LH
49,Doug Davis,P,0,RH,LH
58,Juan Gutierrez,P,0,RH,RH

The first row lists the team name.  The second row lists the manager.  The third row lists the column headers: #, Name, Position, Batting Order, Batting Hand, and Throwing Hand.  Each of the players are listed in the remaining rows.

I wrote a script that automatically grabs the current roster of every MLB team and saves it as a ROS file.  This script runs every day at 12:00 PM.  These files are available from the .ROS Files tab at the top of every page.

ROS files are used by Retrosheet’s box.exe, bevent.exe, and bgame.exe programs.  They are plain-text, comma-delimited files having the format: ID, Last Name, First Name, Batting Hand, Throwing Hand, Team Abbreviation, Position Abbreviation.

ID can be any unique ID for the player.  Retrosheet has a unique ID for each player based on first and last name.  For instance, Derek Jeter is jeted001.  Other databases use different formats.  The files that I generate use the 6 digit unique ID used by mlb.com.

The batting hand value can be either R, L, or B (both – switch hitter).

The throwing hand value can be either R or L.

The team value is a three-digit representation of each team.  Retrosheet has established abbreviations for each team.  They are:ANA, ARI, ATL, BAL, BOS, CHA (Chicago American – Whit Sox), CHN (Chicago National – Cubs), CIN, CLE, COL, DET, FLO, HOU, KCA, LAN, MIL, MIN, NYA, NYN, OAK, PHI, PIT, SDN, SEA, SFN, SLN, TBA, TEX, TOR, and WAS.

The position value can be either: P, C, IF, OF, or DH.

As an example, here are the first few lines from the current Atlanta Braves’ ROS file.

407924,Acosta,Manny,B,R,ATL,P
430831,Bennett,Jeff,R,R,ATL,P
430641,Boyer,Blaine,R,R,ATL,P
499107,Bueno,Francisley,L,L,ATL,P
435658,Campillo,Jorge,R,R,ATL,P

I’ve been a baseball fan for my entire life.  I know that one of the first elements of the sport that truly engaged me was the scorecard.  I’ve always been intrigued at the way that an entire game can be completely described on a single sheet of paper.  No two games are identical, yet a small handful of letters, numbers, and symbols can represent any on-field situation.

When I was younger, my scorecards were much more graphical than they are today.  Initially, I found it easiest and most enjoyable to draw pictures to represent the on-field activity.  Later, especially after I developed an interest in computers and information technology, I set about finding ways to use the computer to process the information that I recorded on my scorecards.  As a result, those pretty pictures were replaced by letters and numbers.

Over the past several years, I’ve been working on a variety of projects based on collecting, storing, and analyzing baseball data on the computer.  For a long while, I’ve been thinking about building a web site to showcase these projects, and to encourage me to continue the development of these projects.

And so… what better of a time than one day after the conclusion of the 2008 World Series to get started?

I proudly introduce you to Pitch-By-Pitch.