Saturday, June 15, 2013

Home run rates by inning, score

HR per inning 2010-2012


Inning HR HR/PA HR/Batted Ball
1 1636 0.026 0.036
2 1576 0.026 0.036
3 1539 0.025 0.034
4 1876 0.030 0.041
5 1645 0.026 0.036
6 1768 0.028 0.039
7 1550 0.025 0.035
8 1411 0.023 0.033
9 1078 0.023 0.034
10 114 0.021 0.034
11 61 0.021 0.032
12 25 0.017 0.026

Home runs by score 2010-2012


Run_diff HR HR/PA HR/Batted Ball
-7 157 0.028 0.038
-6 247 0.027 0.036
-5 368 0.026 0.036
-4 560 0.025 0.036
-3 802 0.025 0.036
-2 1163 0.025 0.035
-1 1700 0.025 0.036
0 3761 0.025 0.036
+1 1743 0.025 0.036
+2 1231 0.026 0.037
+3 835 0.027 0.038
+4 556 0.026 0.037
+5 358 0.026 0.037
+6 239 0.027 0.038
+7 143 0.027 0.037

Sunday, May 5, 2013

Inside the Park Home Runs by Pitchers

Batter Team Year Date Game_id Inning Event text
Joaquin Andujar HOU 1979 814 HOU197908140 2 HR7/IPHR.1-H
Skip Pitlock SFN 1970 808 SFN197008080 5 HR8/IPHR
Tom Griffin HOU 1969 530 PIT196905302 2 HR8/IPHR
Bob Gibson SLN 1966 510 CHN196605100 7 HR7/IPHR
Mel Stottlemyre NYA 1965 720 NYA196507200 5 HR8/F8XD/IPHR.3-H;2-H;1-H
Frank Lary DET 1956 417 DET195604170 5 HR8/IPHR
Mickey McDermott NYA 1956 811 NYA195608110 9 HR8/IPHR
Jim Hearn NY1 1955 709 NY1195507090 5 HR8/L8/IPHR.1-H
Jim Hearn NY1 1954 515 NY1195405150 3 HR8/IPHR.2-H

Friday, April 12, 2013

pitch_seq_tx


The pitches field of the play record

synopsis: play,inning,home/visitor,player id,count,pitches,event
The fifth field, pitches, is a string of variable length and contains all pitches to this batter in this plate appearance. Most Retrosheet games do not have pitch data and consequently this field is blank for such games.

    +  following pickoff throw by the catcher
    *  indicates the following pitch was blocked by the catcher
    .  marker for play not involving the batter
    1  pickoff throw to first
    2  pickoff throw to second
    3  pickoff throw to third
    >  Indicates a runner going on the pitch
    B  ball
    C  called strike
    F  foul
    H  hit batter
    I  intentional ball
    K  strike (unknown type)
    L  foul bunt
    M  missed bunt attempt
    N  no pitch (on balks and interference calls)
    O  foul tip on bunt
    P  pitchout
    Q  swinging on pitchout
    R  foul ball on pitchout
    S  swinging strike
    T  foul tip
    U  unknown or missed pitch
    V  called ball because pitcher went to his mouth
    X  ball put into play by batter
    Y  ball put into play on pitchout

Thursday, February 7, 2013

SQL CODE: First Six Seasons

SELECT a.player_id, a.name, SUM(a.WAR) as WAR, CONCAT(a.debut,"-",a.sixyear_ID) as first_six
FROM
(SELECT p.player_ID, p.name, p.WAR as WAR, y.debut, y.sixyear_ID
FROM
fWAR_p p, (SELECT player_ID, min(year_id) as debut,  min(year_id)+6 as sixyear_ID  FROM fWAR_p GROUP BY player_id)y
WHERE p.player_ID = y.player_ID  and p.year_ID <= y.sixyear_ID AND y.debut >1944
GROUP BY p.player_ID, p.year_ID)a
GROUP BY a.player_ID
ORDER BY WAR desc
LIMIT 50;