Documentation ¶
Index ¶
- func Load(years ...int)
- type BatStats
- func (b BatStats) AB() float64
- func (b BatStats) BB() float64
- func (b BatStats) CS() float64
- func (b BatStats) G() float64
- func (b BatStats) GIDP() float64
- func (b BatStats) H() float64
- func (b BatStats) H2() float64
- func (b BatStats) H3() float64
- func (b BatStats) HBP() float64
- func (b BatStats) HR() float64
- func (b BatStats) IBB() float64
- func (b BatStats) PA() float64
- func (b BatStats) Precise() string
- func (b BatStats) R() float64
- func (b BatStats) RBI() float64
- func (b BatStats) SB() float64
- func (b BatStats) SF() float64
- func (b BatStats) SH() float64
- func (b BatStats) SO() float64
- func (b BatStats) String() string
- type PitchStats
- func (p PitchStats) BAopp() float64
- func (p PitchStats) BB() float64
- func (p PitchStats) BFP() float64
- func (p PitchStats) BK() float64
- func (p PitchStats) CG() float64
- func (p PitchStats) ER() float64
- func (p PitchStats) ERA() float64
- func (p PitchStats) G() float64
- func (p PitchStats) GF() float64
- func (p PitchStats) GIDP() float64
- func (p PitchStats) GS() float64
- func (p PitchStats) H() float64
- func (p PitchStats) HBP() float64
- func (p PitchStats) HR() float64
- func (p PitchStats) IBB() float64
- func (p PitchStats) IPouts() float64
- func (p PitchStats) L() float64
- func (p PitchStats) R() float64
- func (p PitchStats) SF() float64
- func (p PitchStats) SH() float64
- func (p PitchStats) SHO() float64
- func (p PitchStats) SO() float64
- func (p PitchStats) SV() float64
- func (p PitchStats) String() string
- func (p PitchStats) W() float64
- func (p PitchStats) WP() float64
- type Player
- func (p Player) Bio() string
- func (p Player) Birth() int
- func (p Player) ID() string
- func (p Player) IsBatter() bool
- func (p Player) IsPitcher() bool
- func (p Player) IsPosPitcher() bool
- func (p Player) League() string
- func (p Player) Name() string
- func (p Player) Stint() string
- func (p Player) String() string
- func (p Player) Team() string
- func (p Player) Year() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatStats ¶
type BatStats [18]float64
BatStats is an array that holds the 18 tracked batting statistics for a Player. 17 are imported from the lahmanDB, and PA is calculated from that data.
type PitchStats ¶
type PitchStats [25]float64
PitchStats is an array that holds the 25 tracked pitching statistics for a Player.
func (PitchStats) BAopp ¶
func (p PitchStats) BAopp() float64
func (PitchStats) BB ¶
func (p PitchStats) BB() float64
func (PitchStats) BFP ¶
func (p PitchStats) BFP() float64
func (PitchStats) BK ¶
func (p PitchStats) BK() float64
func (PitchStats) CG ¶
func (p PitchStats) CG() float64
func (PitchStats) ER ¶
func (p PitchStats) ER() float64
func (PitchStats) ERA ¶
func (p PitchStats) ERA() float64
func (PitchStats) G ¶
func (p PitchStats) G() float64
func (PitchStats) GF ¶
func (p PitchStats) GF() float64
func (PitchStats) GIDP ¶
func (p PitchStats) GIDP() float64
func (PitchStats) GS ¶
func (p PitchStats) GS() float64
func (PitchStats) H ¶
func (p PitchStats) H() float64
func (PitchStats) HBP ¶
func (p PitchStats) HBP() float64
func (PitchStats) HR ¶
func (p PitchStats) HR() float64
func (PitchStats) IBB ¶
func (p PitchStats) IBB() float64
func (PitchStats) IPouts ¶
func (p PitchStats) IPouts() float64
func (PitchStats) L ¶
func (p PitchStats) L() float64
func (PitchStats) R ¶
func (p PitchStats) R() float64
func (PitchStats) SF ¶
func (p PitchStats) SF() float64
func (PitchStats) SH ¶
func (p PitchStats) SH() float64
func (PitchStats) SHO ¶
func (p PitchStats) SHO() float64
func (PitchStats) SO ¶
func (p PitchStats) SO() float64
func (PitchStats) SV ¶
func (p PitchStats) SV() float64
func (PitchStats) String ¶
func (p PitchStats) String() string
String returns a list of the 25 pitching stats, formatted correctly.
func (PitchStats) W ¶
func (p PitchStats) W() float64
W, etc, return the Player's named pitching stat.
func (PitchStats) WP ¶
func (p PitchStats) WP() float64
type Player ¶
type Player struct { Bat BatStats Pit PitchStats // contains filtered or unexported fields }
A Player is a struct that contains all batting and pitching stats for a player.
func GetPostYear ¶
GetPostYear returns a list of all Players, with batting and pitching lines, for postseason that year.
func GetYear ¶
GetYear returns a list of all Players, with batting and pitching lines, for the regular season that year.
func (Player) IsPosPitcher ¶
IsPosPitcher returns true if the player was normally a position player, but pitched at least once.
func (Player) League ¶
func (p Player) League() string
League returns the league a Player played for.
func (Player) Stint ¶
func (p Player) Stint() string
Stint returns:
for regular season play, the number of their season's appearance with a given team (In other words, if a players is traded their stats for the second team will be stint "2") for postseason play, the *round* of play