Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

baseball-databank · Baseball Databank

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 3322 - 3351 of 4393   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3322 From: "JeffBernstein" <jeffbernstein@...>
Date: Mon Mar 5, 2007 2:28 pm
Subject: Data dictionary??
JeffBernstein
Send Email Send Email
 
Hi,

Is there a data dictionary for the latest version of the Baseball
Databank? Specifically, table names with field names and an
explanation of the purpose of each field.

What about an entity relationship diagram?

Thanks,
Jeff

#3323 From: Tangotiger <tangotiger@...>
Date: Tue Mar 6, 2007 12:58 am
Subject: Re: Data dictionary??
tangotiger
Send Email Send Email
 
The Lahman database, at baseball1.com, has the best
documentation for that.

Tom
--- JeffBernstein <jeffbernstein@...> wrote:

> Hi,
>
> Is there a data dictionary for the latest version of
> the Baseball
> Databank? Specifically, table names with field names
> and an
> explanation of the purpose of each field.
>
> What about an entity relationship diagram?
>
> Thanks,
> Jeff
>
>
>


---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball











-----------------------------------




________________________________________________________________________________\
____
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

#3324 From: "JeffBernstein" <jeffbernstein@...>
Date: Tue Mar 6, 2007 12:11 pm
Subject: Re: Data dictionary??
JeffBernstein
Send Email Send Email
 
--- In baseball-databank@yahoogroups.com, Tangotiger <tangotiger@...>
wrote:
>
> The Lahman database, at baseball1.com, has the best
> documentation for that.
>
> Tom
> --- JeffBernstein <jeffbernstein@...> wrote:

Exactly what I was looking for! Thanks!

-Jeff



>
> > Hi,
> >
> > Is there a data dictionary for the latest version of
> > the Baseball
> > Databank? Specifically, table names with field names
> > and an
> > explanation of the purpose of each field.
> >
> > What about an entity relationship diagram?
> >
> > Thanks,
> > Jeff
> >
> >
> >
>
>
> ---------------------------------------------
> http://www.InsideTheBook.com
> The Book--Playing The Percentages In Baseball
>
>
>
>
>
>
>
>
>
>
>
> -----------------------------------
>
>
>
>
>
________________________________________________________________________________\
____
> Need Mail bonding?
> Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
> http://answers.yahoo.com/dir/?link=list&sid=396546091
>

#3325 From: "brad.behnke" <brad.behnke@...>
Date: Wed Mar 7, 2007 12:55 am
Subject: Database Frontend
brad.behnke
Send Email Send Email
 
Has anyone created a front end for the database? I am currently
weighing in the options as to how to manage this using Visual Basic. I
was just wondering if somebody had started something to input the data
from box scores to better the upkeep of the data and always have a
current database throughout the season.

If anyone wants to jump in on the project I can try to set it up on
sourceforge.net or one of my own sites to manage the project.

Please let me know.

Thank you!

#3326 From: "Sean Forman" <sean-forman@...>
Date: Wed Mar 7, 2007 1:33 am
Subject: Re: Database Frontend
sforman71
Send Email Send Email
 
I know this isn't what you are describing, and it does cost money, but I'm planning on keeping the Baseball-Reference Play Index up-to-date during the season.  Here is the url,
http://www.bb-ref.com/pi/

It has full-season data, but also allows you to search through game and play level data for the last 50 years.

sean

On 3/6/07, brad.behnke <brad.behnke@...> wrote:

Has anyone created a front end for the database? I am currently
weighing in the options as to how to manage this using Visual Basic. I
was just wondering if somebody had started something to input the data
from box scores to better the upkeep of the data and always have a
current database throughout the season.

If anyone wants to jump in on the project I can try to set it up on
sourceforge.net or one of my own sites to manage the project.

Please let me know.

Thank you!




--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3327 From: Tangotiger <tangotiger@...>
Date: Wed Mar 7, 2007 1:25 pm
Subject: Re: Database Frontend
tangotiger
Send Email Send Email
 
I can heartily recommend the PI.

As well, you should join the Retrolist Yahoo group, as
someone just posted a link in the past few days to a
sourceforge project for a Retro PBP database.

Tom

--- Sean Forman <sean-forman@...>
wrote:

> I know this isn't what you are describing, and it
> does cost money, but I'm
> planning on keeping the Baseball-Reference Play
> Index up-to-date during the
> season.  Here is the url,
> http://www.bb-ref.com/pi/
>
> It has full-season data, but also allows you to
> search through game and play
> level data for the last 50 years.
>
> sean
>
> On 3/6/07, brad.behnke <brad.behnke@...>
> wrote:
> >
> >   Has anyone created a front end for the database?
> I am currently
> > weighing in the options as to how to manage this
> using Visual Basic. I
> > was just wondering if somebody had started
> something to input the data
> > from box scores to better the upkeep of the data
> and always have a
> > current database throughout the season.
> >
> > If anyone wants to jump in on the project I can
> try to set it up on
> > sourceforge.net or one of my own sites to manage
> the project.
> >
> > Please let me know.
> >
> > Thank you!
> >
> >
> >
>
>
>
> --
> --
> Sincerely,
> Sean Forman
>
> Baseball Stats!  http://www.Baseball-Reference.com/
> SR Blog!
> http://www.Baseball-Reference.com/blog/
>


---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball











-----------------------------------



________________________________________________________________________________\
____
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

#3328 From: mkovach <mek@...>
Date: Wed Mar 7, 2007 2:20 pm
Subject: Re: Database Frontend
matkovach
Send Email Send Email
 
Tangotiger wrote:
>
>
> I can heartily recommend the PI.
>
> As well, you should join the Retrolist Yahoo group, as
> someone just posted a link in the past few days to a
> sourceforge project for a Retro PBP database.

What would be me ;->

I'll have the files from Baseball Databank available in Postgres, SQLite
(http://www.sqlite.org), Derby (http://db.apache.org/derby/), in
addition to the provided MySQL format.  I don't play around with many
other databases (Oracle, DB2, etc.) but I would be willing to work with
anybody that wants to migrate to those other formats.

I am giving serious focus to using the Baseball Databank files in Derby,
which is a nice embeddable Java database.  It shouldn't be that hard to
make a nice front end that works on Windows, UNIX, and Mac and at the
same time have a database people could us on a website if they like.

The PBP data is another story.  The current PBP database uses about 5Gb.
   Using just ONE seasons data would reduce the size a bit I guess, but
won't be as useful.

In terms of in-season data, I am currently working on updating the
scripts from Haseball Hacks
(http://www.oreilly.com/catalog/baseballhks/).  Work and real life have
pushed this work to the back burner -- I am a system admin, the DST
changes have consumed my life for the past two weeks).

Mat Kovach

#3329 From: "Sean Lahman" <slahman@...>
Date: Wed Mar 7, 2007 3:59 pm
Subject: Re: Database Frontend
anson2995
Send Email Send Email
 
--- In baseball-databank@yahoogroups.com, "brad.behnke"
<brad.behnke@...> wrote:
>
> Has anyone created a front end for the database? I am currently
> weighing in the options as to how to manage this using Visual Basic. I
> was just wondering if somebody had started something to input the data
> from box scores to better the upkeep of the data and always have a
> current database throughout the season.

Randy Myers developed a front that is available for free download from
my website (http://baseball1.com/statistics/bss.html).   It's great
for people who aren't proficient in Access but still want to probe the
data and run queries.  There have been other front ends offered for
sale: Ken Matinale's was one of the earliest, although I don't believe
he's producing it any more.  The one from Lee Sinnis is very popular.

But what you describe sounds like more of a backend tool.  There are a
number of proprietary tools that let you collect play-by-play or box
score data.  However, I don't think that would better the upkeep of
the data.  There are better ways to integrate in-season data.

Having said those things, I do think it would be great to build some
open source tools for working with the database.

Regards,
Sean Lahman

#3330 From: Jeff Bernstein <jeffbernstein@...>
Date: Wed Mar 7, 2007 3:39 pm
Subject: Re: Database Frontend
JeffBernstein
Send Email Send Email
 
I'm thinking about how one would go about designing an effective query interface
without the user
having to know SQL, a way to pose a query in english and have the result come
back.

Or is that every database front-end designer's goal? :-D



--- "brad.behnke" <brad.behnke@...> wrote:

> Has anyone created a front end for the database? I am currently
> weighing in the options as to how to manage this using Visual Basic. I
> was just wondering if somebody had started something to input the data
> from box scores to better the upkeep of the data and always have a
> current database throughout the season.
>
> If anyone wants to jump in on the project I can try to set it up on
> sourceforge.net or one of my own sites to manage the project.
>
> Please let me know.
>
> Thank you!
>
>

#3331 From: Jeff Bernstein <jeffbernstein@...>
Date: Wed Mar 7, 2007 3:41 pm
Subject: Re: Database Frontend
JeffBernstein
Send Email Send Email
 
Hey, that's pretty cool!! Nice job!

-Jeff

--- Sean Forman <sean-forman@...> wrote:

> I know this isn't what you are describing, and it does cost money, but I'm
> planning on keeping the Baseball-Reference Play Index up-to-date during the
> season.  Here is the url,
> http://www.bb-ref.com/pi/
>
> It has full-season data, but also allows you to search through game and play
> level data for the last 50 years.
>
> sean
>
> On 3/6/07, brad.behnke <brad.behnke@...> wrote:
> >
> >   Has anyone created a front end for the database? I am currently
> > weighing in the options as to how to manage this using Visual Basic. I
> > was just wondering if somebody had started something to input the data
> > from box scores to better the upkeep of the data and always have a
> > current database throughout the season.
> >
> > If anyone wants to jump in on the project I can try to set it up on
> > sourceforge.net or one of my own sites to manage the project.
> >
> > Please let me know.
> >
> > Thank you!
> >
> >
> >
>
>
>
> --
> --
> Sincerely,
> Sean Forman
>
> Baseball Stats!  http://www.Baseball-Reference.com/
> SR Blog!           http://www.Baseball-Reference.com/blog/
>

#3332 From: "btibert3" <btibert3@...>
Date: Wed Mar 7, 2007 8:55 pm
Subject: Lahman DB and Age Calculation
btibert3
Send Email Send Email
 
I am using the current release of Sean's DB and I am trying to
calculate the age for each pitcher with the following SQL:

SELECT Pitching.playerID, Pitching.yearID, DateDiff("yyyy",DateSerial
([Master]![birthYear],[Master]![birthMonth],[Master]!
[birthDay]),DateSerial([Pitching]![yearID],7,1)) AS Age
FROM Pitching INNER JOIN Master ON Pitching.playerID =
Master.playerID
WHERE DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
[yearID],7,1))=26;


When I run this, I get a "Data type mismatch in the criteria
expression" error.  I only get this error when I try to filter out
the performance of a pitcher for a certain age.  Simply put, when I
run the calc as is, it runs fine (seemingly).

I am stumped.  By no means am I a DBA, but I am fairly comfortable
with Access and data manipulation.

Do I have a corrupt version of Access?  Has anyone run into the same
problem?  Someone have a better way to calculate age at run time?

Many thanks guys,

~ Brock

#3333 From: "Charles" <chazcreasy1@...>
Date: Wed Mar 7, 2007 9:54 pm
Subject: Re: Lahman DB and Age Calculation
chazcreasy1
Send Email Send Email
 
I've run into the same problem (a week or so ago actually).  I'm not
sure what I've done different since, but this seems to work:

SELECT Master.playerID, Pitching.yearID,
DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] & '/' &
[birthyear]),DateValue("07/01/" & [Pitching].[yearID])) AS AGE
FROM [primary position] INNER JOIN (Master INNER JOIN Pitching ON
Master.playerID = Pitching.playerID) ON ([primary position].yearID =
Pitching.yearID) AND ([primary position].teamID = Pitching.teamID) AND
([primary position].player = Pitching.playerID)
WHERE (((DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] &
'/'
& [birthyear]),DateValue("07/01/" & [Pitching].[yearID])))=26) AND
((Master.birthYear) Is Not Null) AND ((Master.birthMonth) Is Not Null)
AND ((Master.birthDay) Is Not Null));

I'm sure there's a cleaner way to do it, but I'm pretty certain this
will work.  If you do a search and replace for "pitching"->"batting"
you can get all hitters aged 26.

--- In baseball-databank@yahoogroups.com, "btibert3" <btibert3@...> wrote:
>
> I am using the current release of Sean's DB and I am trying to
> calculate the age for each pitcher with the following SQL:
>
> SELECT Pitching.playerID, Pitching.yearID, DateDiff("yyyy",DateSerial
> ([Master]![birthYear],[Master]![birthMonth],[Master]!
> [birthDay]),DateSerial([Pitching]![yearID],7,1)) AS Age
> FROM Pitching INNER JOIN Master ON Pitching.playerID =
> Master.playerID
> WHERE DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> [birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> [yearID],7,1))=26;
>
>
> When I run this, I get a "Data type mismatch in the criteria
> expression" error.  I only get this error when I try to filter out
> the performance of a pitcher for a certain age.  Simply put, when I
> run the calc as is, it runs fine (seemingly).
>
> I am stumped.  By no means am I a DBA, but I am fairly comfortable
> with Access and data manipulation.
>
> Do I have a corrupt version of Access?  Has anyone run into the same
> problem?  Someone have a better way to calculate age at run time?
>
> Many thanks guys,
>
> ~ Brock
>

#3334 From: Tangotiger <tangotiger@...>
Date: Thu Mar 8, 2007 12:20 am
Subject: Re: Re: Lahman DB and Age Calculation
tangotiger
Send Email Send Email
 
If all you require is an integer for an age, may I
suggest simply doing: yearid - birthyear.

Who really cares whether the guy was born Jun 30 or
Jul 2, or Dec 30 or Jan 2?  Whatever you do, it's a
rounded age.

Tom



--- Charles <chazcreasy1@...> wrote:

> I've run into the same problem (a week or so ago
> actually).  I'm not
> sure what I've done different since, but this seems
> to work:
>
> SELECT Master.playerID, Pitching.yearID,
> DateDiff("yyyy",DateValue([birthmonth] & '/' &
> [birthday] & '/' &
> [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])) AS AGE
> FROM [primary position] INNER JOIN (Master INNER
> JOIN Pitching ON
> Master.playerID = Pitching.playerID) ON ([primary
> position].yearID =
> Pitching.yearID) AND ([primary position].teamID =
> Pitching.teamID) AND
> ([primary position].player = Pitching.playerID)
> WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> '/' & [birthday] &
> '/'
> & [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])))=26) AND
> ((Master.birthYear) Is Not Null) AND
> ((Master.birthMonth) Is Not Null)
> AND ((Master.birthDay) Is Not Null));
>
> I'm sure there's a cleaner way to do it, but I'm
> pretty certain this
> will work.  If you do a search and replace for
> "pitching"->"batting"
> you can get all hitters aged 26.
>
> --- In baseball-databank@yahoogroups.com, "btibert3"
> <btibert3@...> wrote:
> >
> > I am using the current release of Sean's DB and I
> am trying to
> > calculate the age for each pitcher with the
> following SQL:
> >
> > SELECT Pitching.playerID, Pitching.yearID,
> DateDiff("yyyy",DateSerial
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> AS Age
> > FROM Pitching INNER JOIN Master ON
> Pitching.playerID =
> > Master.playerID
> > WHERE
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > [yearID],7,1))=26;
> >
> >
> > When I run this, I get a "Data type mismatch in
> the criteria
> > expression" error.  I only get this error when I
> try to filter out
> > the performance of a pitcher for a certain age.
> Simply put, when I
> > run the calc as is, it runs fine (seemingly).
> >
> > I am stumped.  By no means am I a DBA, but I am
> fairly comfortable
> > with Access and data manipulation.
> >
> > Do I have a corrupt version of Access?  Has anyone
> run into the same
> > problem?  Someone have a better way to calculate
> age at run time?
> >
> > Many thanks guys,
> >
> > ~ Brock
> >
>
>
>


---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball











-----------------------------------



________________________________________________________________________________\
____
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265

#3335 From: "Sean Forman" <sean-forman@...>
Date: Thu Mar 8, 2007 12:40 am
Subject: Re: Re: Lahman DB and Age Calculation
sforman71
Send Email Send Email
 
I generally use

yearid - birthyear + (birthmonth > 6) 

The birthmonth > 6 is computed as a boolean, so it is either 1 or 0 depending on whether it is true or not.  I'm not sure if that works in access or not.

sean

On 3/7/07, Tangotiger <tangotiger@...> wrote:

If all you require is an integer for an age, may I
suggest simply doing: yearid - birthyear.

Who really cares whether the guy was born Jun 30 or
Jul 2, or Dec 30 or Jan 2? Whatever you do, it's a
rounded age.

Tom



--- Charles <chazcreasy1@...> wrote:

> I've run into the same problem (a week or so ago
> actually). I'm not
> sure what I've done different since, but this seems
> to work:
>
> SELECT Master.playerID, Pitching.yearID,
> DateDiff("yyyy",DateValue([birthmonth] & '/' &
> [birthday] & '/' &
> [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])) AS AGE
> FROM [primary position] INNER JOIN (Master INNER
> JOIN Pitching ON
> Master.playerID = Pitching.playerID) ON ([primary
> position].yearID =
> Pitching.yearID) AND ([primary position].teamID =
> Pitching.teamID) AND
> ([primary position].player = Pitching.playerID)
> WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> '/' & [birthday] &
> '/'
> & [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])))=26) AND
> ((Master.birthYear) Is Not Null) AND
> ((Master.birthMonth) Is Not Null)
> AND ((Master.birthDay) Is Not Null));
>
> I'm sure there's a cleaner way to do it, but I'm
> pretty certain this
> will work. If you do a search and replace for
> "pitching"->"batting"
> you can get all hitters aged 26.
>
> --- In baseball-databank@yahoogroups.com, "btibert3"
> <btibert3@...> wrote:
> >
> > I am using the current release of Sean's DB and I
> am trying to
> > calculate the age for each pitcher with the
> following SQL:
> >
> > SELECT Pitching.playerID, Pitching.yearID,
> DateDiff("yyyy",DateSerial
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> AS Age
> > FROM Pitching INNER JOIN Master ON
> Pitching.playerID =
> > Master.playerID
> > WHERE
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > [yearID],7,1))=26;
> >
> >
> > When I run this, I get a "Data type mismatch in
> the criteria
> > expression" error. I only get this error when I
> try to filter out
> > the performance of a pitcher for a certain age.
> Simply put, when I
> > run the calc as is, it runs fine (seemingly).
> >
> > I am stumped. By no means am I a DBA, but I am
> fairly comfortable
> > with Access and data manipulation.
> >
> > Do I have a corrupt version of Access? Has anyone
> run into the same
> > problem? Someone have a better way to calculate
> age at run time?
> >
> > Many thanks guys,
> >
> > ~ Brock
> >
>
>
>

---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball

-----------------------------------

__________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265




--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3336 From: "Charles" <chazcreasy1@...>
Date: Wed Mar 7, 2007 10:24 pm
Subject: Re: Lahman DB and Age Calculation
chazcreasy1
Send Email Send Email
 
Oops, I take it back, that query included an extra table I made up
(from a tangotiger query) that included positions for batters.  This
one should be compliant with Sean's DB without any changes.  I believe
that you have to check for null values to prevent the query from
crashing when you try to sort/set a criteria.

SELECT Master.playerID, Pitching.yearID,
DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] & '/' &
[birthyear]),DateValue("07/01/" & [Pitching].[yearID])) AS AGE
FROM Master INNER JOIN Pitching ON Master.playerID = Pitching.playerID
WHERE (((DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] &
'/' & [birthyear]),DateValue("07/01/" & [Pitching].[yearID])))=26) AND
((Master.birthYear) Is Not Null) AND ((Master.birthMonth) Is Not Null)
AND ((Master.birthDay) Is Not Null));

--- In baseball-databank@yahoogroups.com, "Charles" <chazcreasy1@...>
wrote:
>
> I've run into the same problem (a week or so ago actually).  I'm not
> sure what I've done different since, but this seems to work:
>
> SELECT Master.playerID, Pitching.yearID,
> DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] & '/' &
> [birthyear]),DateValue("07/01/" & [Pitching].[yearID])) AS AGE
> FROM [primary position] INNER JOIN (Master INNER JOIN Pitching ON
> Master.playerID = Pitching.playerID) ON ([primary position].yearID =
> Pitching.yearID) AND ([primary position].teamID = Pitching.teamID) AND
> ([primary position].player = Pitching.playerID)
> WHERE (((DateDiff("yyyy",DateValue([birthmonth] & '/' & [birthday] &
> '/'
> & [birthyear]),DateValue("07/01/" & [Pitching].[yearID])))=26) AND
> ((Master.birthYear) Is Not Null) AND ((Master.birthMonth) Is Not Null)
> AND ((Master.birthDay) Is Not Null));
>
> I'm sure there's a cleaner way to do it, but I'm pretty certain this
> will work.  If you do a search and replace for "pitching"->"batting"
> you can get all hitters aged 26.
>
> --- In baseball-databank@yahoogroups.com, "btibert3" <btibert3@> wrote:
> >
> > I am using the current release of Sean's DB and I am trying to
> > calculate the age for each pitcher with the following SQL:
> >
> > SELECT Pitching.playerID, Pitching.yearID, DateDiff("yyyy",DateSerial
> > ([Master]![birthYear],[Master]![birthMonth],[Master]!
> > [birthDay]),DateSerial([Pitching]![yearID],7,1)) AS Age
> > FROM Pitching INNER JOIN Master ON Pitching.playerID =
> > Master.playerID
> > WHERE DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> > [birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > [yearID],7,1))=26;
> >
> >
> > When I run this, I get a "Data type mismatch in the criteria
> > expression" error.  I only get this error when I try to filter out
> > the performance of a pitcher for a certain age.  Simply put, when I
> > run the calc as is, it runs fine (seemingly).
> >
> > I am stumped.  By no means am I a DBA, but I am fairly comfortable
> > with Access and data manipulation.
> >
> > Do I have a corrupt version of Access?  Has anyone run into the same
> > problem?  Someone have a better way to calculate age at run time?
> >
> > Many thanks guys,
> >
> > ~ Brock
> >
>

#3337 From: "Keith Hemmelman" <khemmelman@...>
Date: Thu Mar 8, 2007 1:46 am
Subject: RE: Re: Lahman DB and Age Calculation
khemmelman
Send Email Send Email
 
I was using a IIF statement in my Access 2000 database to calculate the age as of July 1 in a query.  I just tried Sean's formula which is probably more efficient than what I used and it gave the exact same results, so it works fine.
 
Keith Hemmelman
 
-----Original Message-----
From: baseball-databank@yahoogroups.com [mailto:baseball-databank@yahoogroups.com]On Behalf Of Sean Forman
Sent: Wednesday, March 07, 2007 6:41 PM
To: baseball-databank@yahoogroups.com
Subject: Re: [baseball-databank] Re: Lahman DB and Age Calculation

I generally use

yearid - birthyear + (birthmonth > 6) 

The birthmonth > 6 is computed as a boolean, so it is either 1 or 0 depending on whether it is true or not.  I'm not sure if that works in access or not.

sean

.


#3338 From: "John Walsh" <walshj58@...>
Date: Thu Mar 8, 2007 9:02 am
Subject: Re: Re: Lahman DB and Age Calculation
walshj58
Send Email Send Email
 
Shouldn't that be

yearid - birthyear - (birthmonth > 6)

?


On 3/8/07, Sean Forman < sean-forman@...> wrote:

I generally use

yearid - birthyear + (birthmonth > 6) 

The birthmonth > 6 is computed as a boolean, so it is either 1 or 0 depending on whether it is true or not.  I'm not sure if that works in access or not.

sean



On 3/7/07, Tangotiger < tangotiger@...> wrote:

If all you require is an integer for an age, may I
suggest simply doing: yearid - birthyear.

Who really cares whether the guy was born Jun 30 or
Jul 2, or Dec 30 or Jan 2? Whatever you do, it's a
rounded age.

Tom



--- Charles <chazcreasy1@...> wrote:

> I've run into the same problem (a week or so ago
> actually). I'm not
> sure what I've done different since, but this seems
> to work:
>
> SELECT Master.playerID, Pitching.yearID,
> DateDiff("yyyy",DateValue([birthmonth] & '/' &
> [birthday] & '/' &
> [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])) AS AGE
> FROM [primary position] INNER JOIN (Master INNER
> JOIN Pitching ON
> Master.playerID = Pitching.playerID) ON ([primary
> position].yearID =
> Pitching.yearID) AND ([primary position].teamID =
> Pitching.teamID) AND
> ([primary position].player = Pitching.playerID)
> WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> '/' & [birthday] &
> '/'
> & [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])))=26) AND
> ((Master.birthYear) Is Not Null) AND
> ((Master.birthMonth) Is Not Null)
> AND ((Master.birthDay) Is Not Null));
>
> I'm sure there's a cleaner way to do it, but I'm
> pretty certain this
> will work. If you do a search and replace for
> "pitching"->"batting"
> you can get all hitters aged 26.
>
> --- In baseball-databank@yahoogroups.com, "btibert3"
> <btibert3@...> wrote:
> >
> > I am using the current release of Sean's DB and I
> am trying to
> > calculate the age for each pitcher with the
> following SQL:
> >
> > SELECT Pitching.playerID, Pitching.yearID,
> DateDiff("yyyy",DateSerial
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> AS Age
> > FROM Pitching INNER JOIN Master ON
> Pitching.playerID =
> > Master.playerID
> > WHERE
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > [yearID],7,1))=26;
> >
> >
> > When I run this, I get a "Data type mismatch in
> the criteria
> > expression" error. I only get this error when I
> try to filter out
> > the performance of a pitcher for a certain age.
> Simply put, when I
> > run the calc as is, it runs fine (seemingly).
> >
> > I am stumped. By no means am I a DBA, but I am
> fairly comfortable
> > with Access and data manipulation.
> >
> > Do I have a corrupt version of Access? Has anyone
> run into the same
> > problem? Someone have a better way to calculate
> age at run time?
> >
> > Many thanks guys,
> >
> > ~ Brock
> >
>
>
>

---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball

-----------------------------------

__________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265




--
--
Sincerely,        
Sean Forman

Baseball Stats!   http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/



#3339 From: "Sean Forman" <sean-forman@...>
Date: Thu Mar 8, 2007 9:53 am
Subject: Re: Re: Lahman DB and Age Calculation
sforman71
Send Email Send Email
 
Yes, thank you. For some reason, I didn't include parens.

This is probably the most clear
yearid - (birthyear + (birthmonth > 6))

for example if birthyear=1980
birthmonth=9
yearID=2006

age=2006-(1980+1)=25


On 3/8/07, John Walsh <walshj58@...> wrote:

Shouldn't that be

yearid - birthyear - (birthmonth > 6)

?


On 3/8/07, Sean Forman < sean-forman@...> wrote:

I generally use

yearid - birthyear + (birthmonth > 6) 

The birthmonth > 6 is computed as a boolean, so it is either 1 or 0 depending on whether it is true or not.  I'm not sure if that works in access or not.

sean



On 3/7/07, Tangotiger < tangotiger@...> wrote:

If all you require is an integer for an age, may I
suggest simply doing: yearid - birthyear.

Who really cares whether the guy was born Jun 30 or
Jul 2, or Dec 30 or Jan 2? Whatever you do, it's a
rounded age.

Tom



--- Charles <chazcreasy1@...> wrote:

> I've run into the same problem (a week or so ago
> actually). I'm not
> sure what I've done different since, but this seems
> to work:
>
> SELECT Master.playerID, Pitching.yearID,
> DateDiff("yyyy",DateValue([birthmonth] & '/' &
> [birthday] & '/' &
> [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])) AS AGE
> FROM [primary position] INNER JOIN (Master INNER
> JOIN Pitching ON
> Master.playerID = Pitching.playerID) ON ([primary
> position].yearID =
> Pitching.yearID) AND ([primary position].teamID =
> Pitching.teamID) AND
> ([primary position].player = Pitching.playerID)
> WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> '/' & [birthday] &
> '/'
> & [birthyear]),DateValue("07/01/" &
> [Pitching].[yearID])))=26) AND
> ((Master.birthYear) Is Not Null) AND
> ((Master.birthMonth) Is Not Null)
> AND ((Master.birthDay) Is Not Null));
>
> I'm sure there's a cleaner way to do it, but I'm
> pretty certain this
> will work. If you do a search and replace for
> "pitching"->"batting"
> you can get all hitters aged 26.
>
> --- In baseball-databank@yahoogroups.com, "btibert3"
> <btibert3@...> wrote:
> >
> > I am using the current release of Sean's DB and I
> am trying to
> > calculate the age for each pitcher with the
> following SQL:
> >
> > SELECT Pitching.playerID, Pitching.yearID,
> DateDiff("yyyy",DateSerial
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> AS Age
> > FROM Pitching INNER JOIN Master ON
> Pitching.playerID =
> > Master.playerID
> > WHERE
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > [yearID],7,1))=26;
> >
> >
> > When I run this, I get a "Data type mismatch in
> the criteria
> > expression" error. I only get this error when I
> try to filter out
> > the performance of a pitcher for a certain age.
> Simply put, when I
> > run the calc as is, it runs fine (seemingly).
> >
> > I am stumped. By no means am I a DBA, but I am
> fairly comfortable
> > with Access and data manipulation.
> >
> > Do I have a corrupt version of Access? Has anyone
> run into the same
> > problem? Someone have a better way to calculate
> age at run time?
> >
> > Many thanks guys,
> >
> > ~ Brock
> >
>
>
>

---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball

-----------------------------------

__________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265




--
--
Sincerely,        
Sean Forman

Baseball Stats!   http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/





--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3340 From: Tangotiger <tangotiger@...>
Date: Thu Mar 8, 2007 1:42 pm
Subject: Re: Re: Lahman DB and Age Calculation
tangotiger
Send Email Send Email
 
I just want to reiterate that, in society, only with
ages do we not round.

If you are 26.99 years old, you are "26".  If someone
is born on July 2, 1980, then on July 1 2007, he's 26
years and 364 days.  Really, we should represent it as
26.997.

If you have a group of players, you can want guys
beween 26.5 and 27.5, so that their average is 27.0
years old.  And, that means getting everyone born
between Jan 1, 1980 and Dec 31, 1980.

As you can see, all you need is the year, and
therefore, makes the calculation a snap.

The current practice was started in the Baseball
Abstracts, and shouldn't necessarily be followed.

In any case, you can choose any arbitrary date, be it
July 1, Apr 1, Oct 1, and it really doesn't matter
whatsoever, as long as all players are calculated the
same way.

Given that, do it the easiest way, and not the
complicated way.

-- End Soapbox.

Tom





--- Tangotiger <tangotiger@...> wrote:

> If all you require is an integer for an age, may I
> suggest simply doing: yearid - birthyear.
>
> Who really cares whether the guy was born Jun 30 or
> Jul 2, or Dec 30 or Jan 2?  Whatever you do, it's a
> rounded age.
>
> Tom
>
>
>
> --- Charles <chazcreasy1@...> wrote:
>
> > I've run into the same problem (a week or so ago
> > actually).  I'm not
> > sure what I've done different since, but this
> seems
> > to work:
> >
> > SELECT Master.playerID, Pitching.yearID,
> > DateDiff("yyyy",DateValue([birthmonth] & '/' &
> > [birthday] & '/' &
> > [birthyear]),DateValue("07/01/" &
> > [Pitching].[yearID])) AS AGE
> > FROM [primary position] INNER JOIN (Master INNER
> > JOIN Pitching ON
> > Master.playerID = Pitching.playerID) ON ([primary
> > position].yearID =
> > Pitching.yearID) AND ([primary position].teamID =
> > Pitching.teamID) AND
> > ([primary position].player = Pitching.playerID)
> > WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> > '/' & [birthday] &
> > '/'
> > & [birthyear]),DateValue("07/01/" &
> > [Pitching].[yearID])))=26) AND
> > ((Master.birthYear) Is Not Null) AND
> > ((Master.birthMonth) Is Not Null)
> > AND ((Master.birthDay) Is Not Null));
> >
> > I'm sure there's a cleaner way to do it, but I'm
> > pretty certain this
> > will work.  If you do a search and replace for
> > "pitching"->"batting"
> > you can get all hitters aged 26.
> >
> > --- In baseball-databank@yahoogroups.com,
> "btibert3"
> > <btibert3@...> wrote:
> > >
> > > I am using the current release of Sean's DB and
> I
> > am trying to
> > > calculate the age for each pitcher with the
> > following SQL:
> > >
> > > SELECT Pitching.playerID, Pitching.yearID,
> > DateDiff("yyyy",DateSerial
> > >
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> > AS Age
> > > FROM Pitching INNER JOIN Master ON
> > Pitching.playerID =
> > > Master.playerID
> > > WHERE
> >
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> > >
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > > [yearID],7,1))=26;
> > >
> > >
> > > When I run this, I get a "Data type mismatch in
> > the criteria
> > > expression" error.  I only get this error when I
> > try to filter out
> > > the performance of a pitcher for a certain age.
> > Simply put, when I
> > > run the calc as is, it runs fine (seemingly).
> > >
> > > I am stumped.  By no means am I a DBA, but I am
> > fairly comfortable
> > > with Access and data manipulation.
> > >
> > > Do I have a corrupt version of Access?  Has
> anyone
> > run into the same
> > > problem?  Someone have a better way to calculate
> > age at run time?
> > >
> > > Many thanks guys,
> > >
> > > ~ Brock
> > >
> >
> >
> >
>
>
> ---------------------------------------------
> http://www.InsideTheBook.com
> The Book--Playing The Percentages In Baseball
>
>
>
>
>
>
>
>
>
>
>
> -----------------------------------
>
>
>
>
________________________________________________________________________________\
____
> We won't tell. Get more on shows you hate to love
> (and love to hate): Yahoo! TV's Guilty Pleasures
> list.
> http://tv.yahoo.com/collections/265
>


---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball











-----------------------------------



________________________________________________________________________________\
____
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

#3341 From: "btibert3" <btibert3@...>
Date: Thu Mar 8, 2007 1:59 pm
Subject: Re: Lahman DB and Age Calculation
btibert3
Send Email Send Email
 
First, let me thank everyone for taking the time.

Charles, your SQL worked perfectly, so thank you very much.
Truthfully, it never dawned on me to do something simple like Year-
Birthyear, but to be honest, the precise Age calculation is something
that Access should be able to handle and wanted to figure out what
exactly I was doing wrong.

Thanks again to everyone who was willing to help,

~ Brock

#3342 From: "Sean Forman" <sean-forman@...>
Date: Thu Mar 8, 2007 2:22 pm
Subject: Re: Re: Lahman DB and Age Calculation
sforman71
Send Email Send Email
 
Tango,

There is actually a reasonable reason for using July 1st as the cutoff.  When you do that the player's age is given as the age they played most of the year as since July 1st is just about the halfway point of the season.  A player who turns 25 on Oct 1 will have played the entire season as a 24-year-old, while a player who turns 25 on Apr 1 wil have played the season as a 25-year-old.  I think it does make some sense.  In effect, this is rounding the player's age to the age they played the season most as.


This isn't necessarily related.  There is also some evidence (and I may be misquoting) that players with August and Sept birthdays are more likely to make the majors.  Here is a percentage for players born since 1960.

| birth_month | PercBornInMonth |
+-------------+-----------------+
|           1 | 9.0             |
|           2 | 7.1             |
|           3 | 8.3             |
|           4 | 8.0             |
|           5 | 7.7             |
|           6 | 7.1             |
|           7 | 6.6             |
|           8 | 10.9            |
|           9 | 8.8             |
|          10 | 9.4             |
|          11 | 8.9             |
|          12 | 8.2             |

The speculation is that the July and June kids have to play up with older kids in little league and the Aug, Sept kids are the oldest kids in the leagues and get more attention as they are more physically developed.  Or maybe parents are just lying to keep their kids back a year.

On 3/8/07, Tangotiger <tangotiger@...> wrote:

I just want to reiterate that, in society, only with
ages do we not round.

If you are 26.99 years old, you are "26". If someone
is born on July 2, 1980, then on July 1 2007, he's 26
years and 364 days. Really, we should represent it as
26.997.

If you have a group of players, you can want guys
beween 26.5 and 27.5, so that their average is 27.0
years old. And, that means getting everyone born
between Jan 1, 1980 and Dec 31, 1980.

As you can see, all you need is the year, and
therefore, makes the calculation a snap.

The current practice was started in the Baseball
Abstracts, and shouldn't necessarily be followed.

In any case, you can choose any arbitrary date, be it
July 1, Apr 1, Oct 1, and it really doesn't matter
whatsoever, as long as all players are calculated the
same way.

Given that, do it the easiest way, and not the
complicated way.

-- End Soapbox.

Tom



--- Tangotiger <tangotiger@...> wrote:

> If all you require is an integer for an age, may I
> suggest simply doing: yearid - birthyear.
>
> Who really cares whether the guy was born Jun 30 or
> Jul 2, or Dec 30 or Jan 2? Whatever you do, it's a
> rounded age.
>
> Tom
>
>
>
> --- Charles <chazcreasy1@...> wrote:
>
> > I've run into the same problem (a week or so ago
> > actually). I'm not
> > sure what I've done different since, but this
> seems
> > to work:
> >
> > SELECT Master.playerID, Pitching.yearID,
> > DateDiff("yyyy",DateValue([birthmonth] & '/' &
> > [birthday] & '/' &
> > [birthyear]),DateValue("07/01/" &
> > [Pitching].[yearID])) AS AGE
> > FROM [primary position] INNER JOIN (Master INNER
> > JOIN Pitching ON
> > Master.playerID = Pitching.playerID) ON ([primary
> > position].yearID =
> > Pitching.yearID) AND ([primary position].teamID =
> > Pitching.teamID) AND
> > ([primary position].player = Pitching.playerID)
> > WHERE (((DateDiff("yyyy",DateValue([birthmonth] &
> > '/' & [birthday] &
> > '/'
> > & [birthyear]),DateValue("07/01/" &
> > [Pitching].[yearID])))=26) AND
> > ((Master.birthYear) Is Not Null) AND
> > ((Master.birthMonth) Is Not Null)
> > AND ((Master.birthDay) Is Not Null));
> >
> > I'm sure there's a cleaner way to do it, but I'm
> > pretty certain this
> > will work. If you do a search and replace for
> > "pitching"->"batting"
> > you can get all hitters aged 26.
> >
> > --- In baseball-databank@yahoogroups.com,
> "btibert3"
> > <btibert3@...> wrote:
> > >
> > > I am using the current release of Sean's DB and
> I
> > am trying to
> > > calculate the age for each pitcher with the
> > following SQL:
> > >
> > > SELECT Pitching.playerID, Pitching.yearID,
> > DateDiff("yyyy",DateSerial
> > >
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > > [birthDay]),DateSerial([Pitching]![yearID],7,1))
> > AS Age
> > > FROM Pitching INNER JOIN Master ON
> > Pitching.playerID =
> > > Master.playerID
> > > WHERE
> >
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> > >
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > > [yearID],7,1))=26;
> > >
> > >
> > > When I run this, I get a "Data type mismatch in
> > the criteria
> > > expression" error. I only get this error when I
> > try to filter out
> > > the performance of a pitcher for a certain age.
> > Simply put, when I
> > > run the calc as is, it runs fine (seemingly).
> > >
> > > I am stumped. By no means am I a DBA, but I am
> > fairly comfortable
> > > with Access and data manipulation.
> > >
> > > Do I have a corrupt version of Access? Has
> anyone
> > run into the same
> > > problem? Someone have a better way to calculate
> > age at run time?
> > >
> > > Many thanks guys,
> > >
> > > ~ Brock
> > >
> >
> >
> >
>
>
> ---------------------------------------------
> http://www.InsideTheBook.com
> The Book--Playing The Percentages In Baseball
>
>
>
>
>
>
>
>
>
>
>
> -----------------------------------
>
>
>
>
__________________________________________________________
> We won't tell. Get more on shows you hate to love
> (and love to hate): Yahoo! TV's Guilty Pleasures
> list.
> http://tv.yahoo.com/collections/265
>

---------------------------------------------
http://www.InsideTheBook.com
The Book--Playing The Percentages In Baseball

-----------------------------------

__________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121




--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3343 From: "cjhaddick" <cjhaddick@...>
Date: Thu Mar 8, 2007 11:48 am
Subject: Re: Database Frontend
cjhaddick
Send Email Send Email
 
Sean and Mr. Myers,

Excellent work on the B-R PI package!  I think you have just made
Sean's database info available to exponentially more baseball fans,
and for anybody interested in research and drilling down, the modest
price is more than worth it.  Well Done!

CJ Haddick


--- In baseball-databank@yahoogroups.com, "Sean Forman" <sean-
forman@...> wrote:
>
> I know this isn't what you are describing, and it does cost money,
but I'm
> planning on keeping the Baseball-Reference Play Index up-to-date
during the
> season.  Here is the url,
> http://www.bb-ref.com/pi/
>
> It has full-season data, but also allows you to search through game
and play
> level data for the last 50 years.
>
> sean
>
> On 3/6/07, brad.behnke <brad.behnke@...> wrote:
> >
> >   Has anyone created a front end for the database? I am currently
> > weighing in the options as to how to manage this using Visual
Basic. I
> > was just wondering if somebody had started something to input the
data
> > from box scores to better the upkeep of the data and always have a
> > current database throughout the season.
> >
> > If anyone wants to jump in on the project I can try to set it up
on
> > sourceforge.net or one of my own sites to manage the project.
> >
> > Please let me know.
> >
> > Thank you!
> >
> >
> >
>
>
>
> --
> --
> Sincerely,
> Sean Forman
>
> Baseball Stats!  http://www.Baseball-Reference.com/
> SR Blog!           http://www.Baseball-Reference.com/blog/
>

#3344 From: "Douglas Creager" <dcreager@...>
Date: Thu Mar 8, 2007 2:29 pm
Subject: Re: Re: Lahman DB and Age Calculation
dc1847
Send Email Send Email
 
> This isn't necessarily related.  There is also some evidence (and I may be
misquoting) that players with August and Sept birthdays are more likely to make
the majors.  Here is a percentage for players born since 1960.

Doesn't this assume that the birthrates are even throughout the year?
It could just be that more kids are born in August and September.
You'd probably need to compare those percentages to some census data
to make the argument more convincing.

cheers
--doug

--
Douglas Creager
DPhil Candidate, Computing
Oxford University Computing Lab
http://www.softeng.ox.ac.uk/people/Douglas.Creager/
<douglas.creager@...>

#3345 From: "Sean Forman" <sean-forman@...>
Date: Thu Mar 8, 2007 3:18 pm
Subject: Re: Re: Lahman DB and Age Calculation
sforman71
Send Email Send Email
 


Doesn't this assume that the birthrates are even throughout the year?
It could just be that more kids are born in August and September.
You'd probably need to compare those percentages to some census data
to make the argument more convincing.



 

.

I'm probably butchering the results of the study, but I think the original study was for hockey and they found a similar effect, but between Dec. and Jan. which is when the pee wee hockey cutoff occurs.

sean




--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3346 From: <roca_h@...>
Date: Thu Mar 8, 2007 3:48 pm
Subject: Re: Re: Re: Lahman DB and Age Calculation
rocwwm2001
Send Email Send Email
 
Sean, do you know of any Minor League database such as Baseball-Reference.
Many thanks
regards
Henri
>
> From: "Sean Forman" <sean-forman@...>
> Date: 2007/03/08 Thu AM 10:18:18 EST
> To: baseball-databank@yahoogroups.com
> Subject: Re: [baseball-databank] Re: Lahman DB and Age Calculation
>
> >
> > Doesn't this assume that the birthrates are even throughout the year?
> > It could just be that more kids are born in August and September.
> > You'd probably need to compare those percentages to some census data
> > to make the argument more convincing.
> >
>
>
>
>
> .
> >
>
> I'm probably butchering the results of the study, but I think the original
> study was for hockey and they found a similar effect, but between Dec. and
> Jan. which is when the pee wee hockey cutoff occurs.
>
> sean
>
>
> >
>
>
>
> --
> --
> Sincerely,
> Sean Forman
>
> Baseball Stats!  http://www.Baseball-Reference.com/
> SR Blog!           http://www.Baseball-Reference.com/blog/
>
>

#3347 From: "Theodore Turocy" <drarbiter@...>
Date: Thu Mar 8, 2007 4:08 pm
Subject: Re: Re: Re: Lahman DB and Age Calculation
arb1ter
Send Email Send Email
 


On 3/8/07, roca_h@... <roca_h@...> wrote:

Sean, do you know of any Minor League database such as Baseball-Reference.





There are (currently) no free, generally-available minor league databases.  I've compiled data from 2005 and 2006 (and 1982) at

http://econweb.tamu.edu/turocy/minors

and have plans to complete 2002-2004 in the near future, time permitting.

TT
--
drarbiter@... - AMDG

#3348 From: "aprileric_1999" <eric.april.jones@...>
Date: Thu Mar 8, 2007 4:19 pm
Subject: DOB Calc and Birth Month
aprileric_1999
Send Email Send Email
 
I pulled birth by month data from
http://abcnews.go.com/Health/Science/story?id=990641 (Covering 1995-
2002) and found that the player distribution provided earlier does
differ from that of the average population.  I used the raw (rather
than per day figures).
       Ballplayers
      Actual Expected
JAN   9.0%    8.2%
FEB   7.1%    7.6%
MAR   8.3%    8.4%
APR   8.1%    8.0%
MAY   7.7%    8.4%
JUN   7.1%    8.3%
JUL   6.6%    8.8%
AUG  10.9%    8.9%
SEP   8.8%    8.7%
OCT   9.4%    8.5%
NOV   8.9%    8.0%
DEC   8.2%    8.3%

One important caveat is that this assumes the distribution of births
by month has remained static over time.  I'd be willing to bet that
this is not true.  I expect that births were much more skewed toward
September and October earlier in the 20th century, when people had
much less opportunity to get out during December and January.

A fairer comparison might be to look at the distribution of birth
months of ballplayers born after some more recent date, say 1969.  We
probably also should exclude players who only appeared in the most
recent season, since I would expect a slight bias toward players born
earlier in the year.  These players would be older and perhaps more
likely to get a late season callup; I'm guessing here, of course, and
the effect is probably small, though the distribution of birth dates
by number of games played in the player's debut season might be an
interesting study.

#3349 From: "Sean Forman" <sean-forman@...>
Date: Thu Mar 8, 2007 4:27 pm
Subject: Re: Re: Re: Lahman DB and Age Calculation
sforman71
Send Email Send Email
 
thebaseballcube.com has a lot of recent minor league info.  I'm hoping to do some work on minor leaguers as well on BR, but it will be awhile.

sean

On 3/8/07, roca_h@... <roca_h@...> wrote:

Sean, do you know of any Minor League database such as Baseball-Reference.
Many thanks
regards
Henri
>
> From: "Sean Forman" <sean-forman@...>
> Date: 2007/03/08 Thu AM 10:18:18 EST
> To: baseball-databank@yahoogroups.com
> Subject: Re: [baseball-databank] Re: Lahman DB and Age Calculation
>
> >

> > Doesn't this assume that the birthrates are even throughout the year?
> > It could just be that more kids are born in August and September.
> > You'd probably need to compare those percentages to some census data
> > to make the argument more convincing.
> >
>
>
>
>
> .
> >
>
> I'm probably butchering the results of the study, but I think the original
> study was for hockey and they found a similar effect, but between Dec. and
> Jan. which is when the pee wee hockey cutoff occurs.
>
> sean
>
>
> >
>
>
>
> --
> --
> Sincerely,
> Sean Forman
>
> Baseball Stats! http://www.Baseball-Reference.com/
> SR Blog! http://www.Baseball-Reference.com/blog/
>
>




--
--
Sincerely,        
Sean Forman

Baseball Stats!  http://www.Baseball-Reference.com/
SR Blog!           http://www.Baseball-Reference.com/blog/

#3350 From: Tom Stillman <giantsfan_94121@...>
Date: Thu Mar 8, 2007 6:18 pm
Subject: Re: Re: Lahman DB and Age Calculation
giantsfan_94121
Send Email Send Email
 
I agree but would like to add an additional 2 cents.
Often we hear about someone being the "oldest" or
"youngest" to accomplish a certain feat in baseball.
In those cases, age is invariably given in years and
days.

Tom Stillman

--- Tangotiger <tangotiger@...> wrote:

> I just want to reiterate that, in society, only with
> ages do we not round.
>
> If you are 26.99 years old, you are "26".  If
> someone
> is born on July 2, 1980, then on July 1 2007, he's
> 26
> years and 364 days.  Really, we should represent it
> as
> 26.997.
>
> If you have a group of players, you can want guys
> beween 26.5 and 27.5, so that their average is 27.0
> years old.  And, that means getting everyone born
> between Jan 1, 1980 and Dec 31, 1980.
>
> As you can see, all you need is the year, and
> therefore, makes the calculation a snap.
>
> The current practice was started in the Baseball
> Abstracts, and shouldn't necessarily be followed.
>
> In any case, you can choose any arbitrary date, be
> it
> July 1, Apr 1, Oct 1, and it really doesn't matter
> whatsoever, as long as all players are calculated
> the
> same way.
>
> Given that, do it the easiest way, and not the
> complicated way.
>
> -- End Soapbox.
>
> Tom
>
>
>
>
>
> --- Tangotiger <tangotiger@...> wrote:
>
> > If all you require is an integer for an age, may I
> > suggest simply doing: yearid - birthyear.
> >
> > Who really cares whether the guy was born Jun 30
> or
> > Jul 2, or Dec 30 or Jan 2?  Whatever you do, it's
> a
> > rounded age.
> >
> > Tom
> >
> >
> >
> > --- Charles <chazcreasy1@...> wrote:
> >
> > > I've run into the same problem (a week or so ago
> > > actually).  I'm not
> > > sure what I've done different since, but this
> > seems
> > > to work:
> > >
> > > SELECT Master.playerID, Pitching.yearID,
> > > DateDiff("yyyy",DateValue([birthmonth] & '/' &
> > > [birthday] & '/' &
> > > [birthyear]),DateValue("07/01/" &
> > > [Pitching].[yearID])) AS AGE
> > > FROM [primary position] INNER JOIN (Master INNER
> > > JOIN Pitching ON
> > > Master.playerID = Pitching.playerID) ON
> ([primary
> > > position].yearID =
> > > Pitching.yearID) AND ([primary position].teamID
> =
> > > Pitching.teamID) AND
> > > ([primary position].player = Pitching.playerID)
> > > WHERE (((DateDiff("yyyy",DateValue([birthmonth]
> &
> > > '/' & [birthday] &
> > > '/'
> > > & [birthyear]),DateValue("07/01/" &
> > > [Pitching].[yearID])))=26) AND
> > > ((Master.birthYear) Is Not Null) AND
> > > ((Master.birthMonth) Is Not Null)
> > > AND ((Master.birthDay) Is Not Null));
> > >
> > > I'm sure there's a cleaner way to do it, but I'm
> > > pretty certain this
> > > will work.  If you do a search and replace for
> > > "pitching"->"batting"
> > > you can get all hitters aged 26.
> > >
> > > --- In baseball-databank@yahoogroups.com,
> > "btibert3"
> > > <btibert3@...> wrote:
> > > >
> > > > I am using the current release of Sean's DB
> and
> > I
> > > am trying to
> > > > calculate the age for each pitcher with the
> > > following SQL:
> > > >
> > > > SELECT Pitching.playerID, Pitching.yearID,
> > > DateDiff("yyyy",DateSerial
> > > >
> > >
> >
>
([Master]![birthYear],[Master]![birthMonth],[Master]!
> > > >
> [birthDay]),DateSerial([Pitching]![yearID],7,1))
> > > AS Age
> > > > FROM Pitching INNER JOIN Master ON
> > > Pitching.playerID =
> > > > Master.playerID
> > > > WHERE
> > >
> >
>
DateDiff("yyyy",DateSerial([Master]![birthYear],[Master]!
> > > >
> > >
> >
>
[birthMonth],[Master]![birthDay]),DateSerial([Pitching]!
> > > > [yearID],7,1))=26;
> > > >
> > > >
> > > > When I run this, I get a "Data type mismatch
> in
> > > the criteria
> > > > expression" error.  I only get this error when
> I
> > > try to filter out
> > > > the performance of a pitcher for a certain
> age.
> > > Simply put, when I
> > > > run the calc as is, it runs fine (seemingly).
>
> > > >
> > > > I am stumped.  By no means am I a DBA, but I
> am
> > > fairly comfortable
> > > > with Access and data manipulation.
> > > >
> > > > Do I have a corrupt version of Access?  Has
> > anyone
> > > run into the same
> > > > problem?  Someone have a better way to
> calculate
> > > age at run time?
> > > >
> > > > Many thanks guys,
> > > >
> > > > ~ Brock
> > > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------
> > http://www.InsideTheBook.com
> > The Book--Playing The Percentages In Baseball
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -----------------------------------
> >
> >
> >
> >
>
________________________________________________________________________________\
____
> > We won't tell. Get more on shows you hate to love
> > (and love to hate): Yahoo! TV's Guilty Pleasures
> > list.
> > http://tv.yahoo.com/collections/265
> >
>
>
> ---------------------------------------------
> http://www.InsideTheBook.com
> The Book--Playing The Percentages In Baseball
>
>
>
>
>
>
>
>
>
>
>
>
=== message truncated ===




________________________________________________________________________________\
____
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

#3351 From: Tom Stillman <giantsfan_94121@...>
Date: Thu Mar 8, 2007 6:09 pm
Subject: Re: Re: Lahman DB and Age Calculation
giantsfan_94121
Send Email Send Email
 
I have to agree with this.  How many people do you
know that were born at the end of September/beginning
of October (conceived during the Holidays) and how
many do you know born toward the middle of November
(conceived on Valentine's Day)?

Tom Stillman

--- Douglas Creager <dcreager@...> wrote:

> > This isn't necessarily related.  There is also
> some evidence (and I may be misquoting) that players
> with August and Sept birthdays are more likely to
> make the majors.  Here is a percentage for players
> born since 1960.
>
> Doesn't this assume that the birthrates are even
> throughout the year?
> It could just be that more kids are born in August
> and September.
> You'd probably need to compare those percentages to
> some census data
> to make the argument more convincing.
>
> cheers
> --doug
>
> --
> Douglas Creager
> DPhil Candidate, Computing
> Oxford University Computing Lab
> http://www.softeng.ox.ac.uk/people/Douglas.Creager/
> <douglas.creager@...>
>




________________________________________________________________________________\
____
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Messages 3322 - 3351 of 4393   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help