<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Baseball Simulator &#187; Lahman</title>
	<atom:link href="http://baseballsimulator.com/blog/tag/lahman/feed/" rel="self" type="application/rss+xml" />
	<link>http://baseballsimulator.com/blog</link>
	<description>Source for baseball simulation, Stratomatic online, baseball cards, baseball statistics, boxscores, and scripts.</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:28:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<image>
<link>http://baseballsimulator.com/blog</link>
<url>http://baseballsimulator.com/blog/favicon.ico</url>
<title>Baseball Simulator</title>
</image>
		<item>
		<title>Baseball hacks database</title>
		<link>http://baseballsimulator.com/blog/2009/04/07/baseball-hacks-database/</link>
		<comments>http://baseballsimulator.com/blog/2009/04/07/baseball-hacks-database/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 13:11:51 +0000</pubDate>
		<dc:creator>Bill</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Baseball Hacks]]></category>
		<category><![CDATA[Lahman]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Sabermetrics]]></category>

		<guid isPermaLink="false">http://baseballsimulator.com/blog/?p=348</guid>
		<description><![CDATA[For the past few days I&#8217;ve been working on building a baseball database of all of the players who have played baseball from 1871 to 2008.  The tricky part in building such a database is gathering statistics of the current season and merging it with the Lahman baseball database.  A book called Baseball Hacks shows [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few days I&#8217;ve been working on building a <a href="http://baseball1.com/" target="_blank">baseball database</a> of all of the players who have played baseball from 1871 to 2008.  The tricky part in building such a database is gathering statistics of the current season and merging it with the Lahman baseball database.  A book called <a href="http://www.amazon.com/gp/product/0596009429?ie=UTF8&amp;tag=bsim&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0596009429">Baseball Hacks</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=bsim&amp;l=as2&amp;o=1&amp;a=0596009429" border="0" alt="" width="1" height="1" /> shows you how to gather statistics from the current season by using  data from <a href="http://mlb.mlb.com/index.jsp" target="_blank">http://mlb.mlb.com</a> and inserting it into a MySQL database.</p>
<p>One of the drawbacks in merging this data is trying to find a way to cross-reference a player&#8217;s playerID in the Lahman database with his mlb.com ID.  A playerID is generated by using the first five letters of a player&#8217;s last name and first two letters of his first name.  A number is added to the end of the ID to make it unique in case of duplicates. The playerID for Chipper Jones, for example, is <em>jonesch06</em>.  His mlb.com ID is <em>116706</em>.  I was thinking since I know the pattern of how the playerIDs are generated in the Lahman database I could somehow use that to link the Lahman database data to the mlb.com data but this method could end up being too inaccurate.</p>
<p>Luckily, I stumbled upon the forums at <a href="http://www.baseball-fever.com" target="_blank">http://www.baseball-fever.com</a>.  In the <em>Statistics, Analysis, &amp; Sabermetrics</em> area there are some individuals asking how to link these IDs together.   The author of <a href="http://www.insidethebook.com/" target="_blank">THE BOOK &#8212; Playing The Percentages In Baseball</a> posted a file that contains the playerIDs mlb.com IDs of all players.  I should be able to use this information to merge the Lahman database with this current season!  Hopefully, I&#8217;ll have a working database of past seasons and the current season soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://baseballsimulator.com/blog/2009/04/07/baseball-hacks-database/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

