Skip to contents

Award information for players awards

Usage

data(AwardsPlayers)

Format

A data frame with 6797 observations on the following 6 variables.

playerID

Player ID code

awardID

Name of award won

yearID

Year

lgID

League; a factor with levels AA AL ML NL

tie

Award was a tie (Y or N)

notes

Notes about the award

Source

Lahman, S. (2024) Lahman's Baseball Database, 1871-2023, 2024 version, http://www.seanlahman.com/

Examples

data(AwardsPlayers)
# Which awards have been given and how many?
with(AwardsPlayers, table(awardID))
#> awardID
#>                            ALCS MVP                   All-Star Game MVP 
#>                                  43                                  62 
#>                     Babe Ruth Award          Baseball Magazine All-Star 
#>                                  78                                1520 
#>                 Branch Rickey Award         Comeback Player of the Year 
#>                                  23                                  36 
#>                      Cy Young Award                          Gold Glove 
#>                                 126                                1204 
#>                    Hank Aaron Award                         Hutch Award 
#>                                  50                                  55 
#>           Lou Gehrig Memorial Award                Most Valuable Player 
#>                                  69                                 208 
#>                            NLCS MVP                Outstanding DH Award 
#>                                  49                                   8 
#>               Pitching Triple Crown                      Platinum Glove 
#>                                  39                                  26 
#>          Reliever of the Year Award              Roberto Clemente Award 
#>                                  94                                  54 
#>                  Rookie of the Year                      SIlver Slugger 
#>                                 154                                   5 
#>                      Silver Slugger                        TSN All-Star 
#>                                 792                                1525 
#>             TSN Fireman of the Year                       TSN Guide MVP 
#>                                  88                                  33 
#> TSN Major League Player of the Year             TSN Pitcher of the Year 
#>                                  89                                 151 
#>              TSN Player of the Year            TSN Reliever of the Year 
#>                                  92                                  36 
#>                        Triple Crown                    World Series MVP 
#>                                  17                                  71 
awardtab <- with(AwardsPlayers, table(awardID))

# Plot the awardtab table as a Cleveland dot plot
library("lattice")
dotplot(awardtab)


# Restrict to MVP awards
mvp <- subset(AwardsPlayers, awardID == "Most Valuable Player")
# Who won in 1994?
mvp[mvp$yearID == 1994L, ]
#>       playerID              awardID yearID lgID  tie notes
#> 5105 thomafr04 Most Valuable Player   1994   AL <NA>  <NA>
#> 5106 bagweje01 Most Valuable Player   1994   NL <NA>  <NA>

goldglove <- subset(AwardsPlayers, awardID == "Gold Glove")
# which players won most often?
GGcount <- table(goldglove$playerID)
GGcount[GGcount>10]
#> 
#> clemero01 hernake01  kaatji01 maddugr01  mayswi01 robinbr01 rodriiv01 smithoz01 
#>        12        11        16        18        12        16        13        13 
#> vizquom01 
#>        11 

# Triple Crown winners
subset(AwardsPlayers, awardID == "Triple Crown")
#>       playerID      awardID yearID lgID  tie notes
#> 620   cobbty01 Triple Crown   1909   AL <NA>  <NA>
#> 642  hinespa01 Triple Crown   1878   NL <NA>  <NA>
#> 645  oneilti01 Triple Crown   1887   AA <NA>  <NA>
#> 649  duffyhu01 Triple Crown   1894   NL <NA>  <NA>
#> 651  lajoina01 Triple Crown   1901   AL <NA>  <NA>
#> 1156 hornsro01 Triple Crown   1922   NL <NA>  <NA>
#> 1272 hornsro01 Triple Crown   1925   NL <NA>  <NA>
#> 1668  foxxji01 Triple Crown   1933   AL <NA>  <NA>
#> 1669 kleinch01 Triple Crown   1933   NL <NA>  <NA>
#> 1721 gehrilo01 Triple Crown   1934   AL <NA>  <NA>
#> 1954 robinfr02 Triple Crown   1966   AL <NA>  <NA>
#> 2011 yastrca01 Triple Crown   1967   AL <NA>  <NA>
#> 3087 medwijo01 Triple Crown   1937   NL <NA>  <NA>
#> 3353 willite01 Triple Crown   1942   AL <NA>  <NA>
#> 3610 willite01 Triple Crown   1947   AL <NA>  <NA>
#> 3898 mantlmi01 Triple Crown   1956   AL <NA>  <NA>
#> 6508 cabremi01 Triple Crown   2012   AL <NA>  <NA>

# Simultaneous Triple Crown and MVP winners
# (compare merged file to TC)
TC <- subset(AwardsPlayers, awardID == "Triple Crown")
MVP <- subset(AwardsPlayers, awardID == "Most Valuable Player")
keepvars <- c("playerID", "yearID", "lgID.x")
merge(TC, MVP, by = c("playerID", "yearID"))[ ,keepvars]
#>    playerID yearID lgID.x
#> 1 cabremi01   2012     AL
#> 2  foxxji01   1933     AL
#> 3 hornsro01   1925     NL
#> 4 mantlmi01   1956     AL
#> 5 medwijo01   1937     NL
#> 6 robinfr02   1966     AL
#> 7 yastrca01   1967     AL