mmlak-0109
4/24/2017 - 3:36 PM

This code is for a data visualization project I made for Udacity's "Data Visualization" class. I used a combination of dimple and d3.

This code is for a data visualization project I made for Udacity's "Data Visualization" class. I used a combination of dimple and d3.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Make Effective Data Visualization: Baseball</title>
    <link rel="stylesheet" type="text/css" href="baseball.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/dimple/2.2.0/dimple.latest.min.js"></script>
    <script src="baseball.js"></script>
    <script src="jquery-3.2.0.min.js"></script>
  </head>
  <body>
    <div class="grid">
      <div class="row">
        <div class="col-12">
          <h1>Make Effective Data Visualization: Baseball</h1>
        </div>
      </div>
      <div class="row">
        <div class="col-12">
          <p>The data-set for these visualizations contain 1,157 baseball players.  The player data includes their handedness (right, left, or both), height (in inches), weight (in pounds), batting average, and home runs.  My goal for these visualizations is twofold.  First, to show how the players (grouped by their handedness) compare across their average performance stats.  Second, to show you the relationships between players (grouped by their height and weight) compare across their average performance stats.</p>
          <p>To navigate between the two sets of visualizations, click on the "Average Performance Stats by Handedness" and "Average Performance Stats by Height/Weight" buttons.  To navigate between the charts in each set, click on the buttons connected to the charts.</p>
        </div>
      </div>
      <div class="row" id="nav_buttons">
        <div class="col-3">
          <button class="button" onclick="show_or_hide('numbers_row')">Average Performance Stats by Handedness</button>
          <button class="button" onclick="show_or_hide('relationships_row')">Average Performance Stats by Height/Weight</button>
        </div>
      </div>
      <div class="row" id="numbers_row">
        <div class="col-10">
          <div class="chart" id="the_numbers">
            <script type="text/javascript">
              d3.csv("baseball_data.csv", draw_the_numbers);
            </script>
          </div>
        </div>
        <div class="col-2" id="numbers_buttons">
          <h3>Findings:</h3>
          <p>Here it can be seen that even though right handers have the most players by far (more than left handers and switch hitters combined), right handers only came in second in home runs and third in batting average.  In addition, while handedness did provide an advantage in home runs (with left handers having 13 more on average than right handers and 24 more than switch hitters), handedness didn't provide a significant advantage for batting average.</p>
        </div>
      </div>
      <div class="row" id="relationships_row">
        <div class="col-10">
          <div class="chart" id="relationships">
            <script type="text/javascript">
              d3.csv("baseball_data.csv", draw_relationships);
            </script>
          </div>
        </div>
        <div class="col-2" id="relationships_buttons">
          <h3>Findings:</h3>
          <p>Here it can be seen that while there is an overall negative relationship between batting average and height, there is not a clear relationship between batting average and weight (however, batting average does seem to fluctuate more as weight increases).  In addition, there is not a clear relationship between home runs and height nor home runs and weight.</p>
        </div>
      </div>
    </div>
  </body>
</html>
name,handedness,height,weight,avg,HR
Tom Brown,R,73,170,0,0
Denny Lemaster,R,73,182,0.13,4
Joe Nolan,L,71,175,0.263,27
Denny Doyle,L,69,175,0.25,16
Jose Cardenal,R,70,150,0.275,138
Mike Ryan,R,74,205,0.193,28
Fritz Peterson,B,72,185,0.159,2
Dick Bertell,R,72,200,0.25,10
Rod Kanehl,R,73,180,0.241,6
Ozzie Osborn,R,74,195,0,0
John LaRose,L,73,185,0,0
Jeff Byrd,R,75,195,0,0
Juan Bonilla,R,69,170,0.256,7
Frank Tepedino,L,71,185,0.241,6
Jerry Kutzler,L,73,175,0,0
Rick Wise,R,73,180,0.195,15
Darrell Evans,L,74,200,0.248,414
Buck Martinez,R,70,190,0.225,58
John Wockenfuss,R,72,190,0.262,86
Tommy McCraw,L,72,183,0.246,75
Jeff Barkley,B,75,185,0,0
Eric Wilkins,R,73,190,0,0
Britt Burns,L,77,215,0,0
Lee Lacy,R,73,175,0.286,91
Pete Rose,B,71,192,0.303,160
Danny Walton,R,72,195,0.223,28
Bobby Cox,R,71,180,0.225,9
Brad Wellman,R,72,170,0.231,6
Jeff Newman,R,74,215,0.224,63
Pedro Gonzalez,R,72,176,0.244,8
Nardi Contreras,B,74,193,0,0
Tommie Reynolds,R,74,190,0.226,12
Gene Clines,R,69,170,0.277,5
Jim Hickman,R,75,192,0.252,159
Jack Billingham,R,76,195,0.111,0
Jerry Buchek,R,71,185,0.22,22
Ivan DeJesus,R,71,175,0.254,21
Gary Nolan,R,74,197,0.138,1
Gil Patterson,R,73,185,0,0
Fred Whitfield,L,73,190,0.253,108
Larry Dierker,R,76,215,0.136,4
Dave Skaggs,R,74,200,0.241,3
Dick Ruthven,R,75,190,0.183,1
Jerry Garvin,L,75,195,0,0
Steve Eddy,R,74,185,0,0
Dave Kingman,R,78,210,0.236,442
Eric Soderholm,R,71,187,0.264,102
Kevin Mmahat,L,77,220,0,0
Ed Brinkman,R,72,170,0.224,60
Wayne Garrett,L,71,175,0.239,61
Tony Muser,L,74,180,0.259,7
Jim Siwy,R,76,200,0,0
Bud Anderson,R,75,210,0,0
Ted Ford,R,70,180,0.219,17
Kevin Stanfield,L,72,190,0,0
Jim Lyttle,L,72,180,0.248,9
John Butcher,R,76,185,0,0
Jerry Ujdur,R,73,195,0,0
Scot Thompson,L,75,195,0.262,5
Gene Locklear,L,70,165,0.274,9
Bo Diaz,R,71,185,0.255,87
Bump Wills,B,69,172,0.266,36
Brian Denman,R,76,205,0,0
Pat Putnam,L,72,205,0.255,63
Kurt Bevacqua,R,72,180,0.236,27
Bob Fallon,L,75,200,0,0
Syd O'Brien,R,73,185,0.23,24
Chris Chambliss,L,73,195,0.279,185
Tom Satriano,L,73,185,0.225,21
Jeffrey Leonard,R,74,200,0.266,144
Dal Maxvill,R,71,157,0.217,6
Steve Curry,R,78,217,0,0
Cesar Tovar,R,69,155,0.278,46
Mickey Lolich,B,73,170,0.11,0
Ray Chadwick,B,74,180,0,0
Jack Heidemann,R,72,175,0.211,9
Rich Rollins,R,70,185,0.269,77
Walt Bond,L,79,228,0.256,41
Merv Rettenmund,R,70,190,0.271,66
Bryan Clutterbuck,R,76,223,0,0
Byron Browne,R,74,190,0.236,30
Hector Torres,R,72,175,0.216,18
Walt Williams,R,66,165,0.27,33
Jerry Koosman,R,74,205,0.119,2
Steve Lombardozzi,R,72,175,0.233,20
Joe Azcue,R,72,190,0.252,50
Elliott Maddox,R,71,180,0.261,18
Omar Moreno,L,74,180,0.252,37
Julian Javier,R,73,175,0.257,78
Tony Ferreira,L,73,160,0,0
Elio Chacon,R,69,160,0.232,4
Rusty Torres,B,70,175,0.212,35
John Stearns,R,72,185,0.26,46
Larry Brown,R,70,160,0.233,47
Tommy Dean,R,72,165,0.18,4
Bryan Oelkers,L,75,192,0,0
Kevin Bearse,L,74,195,0,0
Marty Martinez,B,72,170,0.243,0
Bruce Boisclair,L,74,185,0.263,10
Ken Singleton,B,76,210,0.282,246
Frank White,R,71,165,0.255,160
Jim Fairey,L,70,190,0.235,7
Jose Roman,R,72,175,0,0
Tom Brookens,R,70,165,0.246,71
Gary Thomasson,L,73,180,0.249,61
Mike Trujillo,R,73,180,0,0
Albert Williams,R,76,190,0,0
Oswaldo Peraza,R,76,172,0,0
Otto Velez,R,72,170,0.251,78
Tony Scott,B,72,164,0.249,17
Ray Oyler,R,71,165,0.175,15
Barry Cort,R,77,210,0,0
Floyd Robinson,L,69,175,0.283,67
Steve Jeltz,B,71,180,0.21,5
Lou Brock,L,71,170,0.293,149
Bill Wilkinson,R,70,160,0,0
Joe Lovitto,B,72,185,0.216,4
Mike Loynd,R,76,210,0,0
Wayne Comer,R,70,175,0.229,16
Dave Collins,B,71,175,0.272,32
Ed Spiezio,R,71,180,0.238,39
Rico Petrocelli,R,72,175,0.251,210
Johnny Lewis,L,73,189,0.227,22
Dick Simpson,R,76,176,0.207,15
Ken Boswell,L,72,170,0.248,31
Ken McMullen,R,75,190,0.248,156
Randy Scarbery,B,73,185,0,0
Steve Swisher,R,74,205,0.216,20
Ben Callahan,R,79,230,0,0
Dick Howser,R,68,155,0.248,16
Manny Castillo,B,69,160,0.242,3
Mike Ramsey,B,73,170,0.24,2
Willie Crawford,L,73,197,0.268,86
Bobby Cuellar,R,71,188,0,0
Willie Norwood,R,72,185,0.242,18
Mike Jones,L,78,215,0,0
Jeff Stone,L,72,175,0.277,11
Ramon Manon,R,72,150,0,0
Joe Lahoud,L,73,198,0.223,65
Tim Flannery,L,71,175,0.255,9
Dave McKay,B,73,195,0.229,21
John Trautwein,R,75,205,0,0
Andy Replogle,R,77,205,0,0
Zach Crouch,L,75,180,0,0
Benny Ayala,R,73,185,0.251,38
Ron Romanick,R,76,195,0,0
Greg Gross,L,70,160,0.287,7
Bruce Tanner,L,75,220,0,0
Sal Butera,R,72,190,0.227,8
Jack Brohamer,L,70,165,0.245,30
Von Joshua,L,70,170,0.273,30
Eddie Milner,L,71,173,0.253,42
Johnny Jeter,R,73,180,0.244,18
Angel Salazar,R,72,180,0.212,2
Tony Oliva,L,73,175,0.304,220
Cito Gaston,R,75,190,0.256,91
Cookie Rojas,R,70,160,0.263,54
Rich Morales,R,71,170,0.195,6
Dave Ford,R,76,190,0,0
Dan Ford,R,73,185,0.27,121
Barry Raziano,B,70,175,0,0
Darryl Motley,R,69,196,0.243,44
Ozzie Virgil,R,73,180,0.243,98
Johnny Oates,L,71,188,0.25,14
Pat Underwood,L,72,175,0,0
Mike Phillips,L,72,170,0.24,11
Ron Santo,R,72,190,0.277,342
Jay Johnstone,L,73,175,0.267,102
Jim Ray Hart,R,71,185,0.278,170
Marc Hill,R,75,205,0.223,34
Joel McKeon,L,72,185,0,0
Danny Fife,R,75,175,0,0
Chico Salmon,R,70,160,0.249,31
Joe Niekro,R,73,185,0.156,1
Andy Etchebarren,R,73,190,0.235,49
Ken Berry,R,72,175,0.255,58
Dave Concepcion,R,74,155,0.267,101
Junior Moore,R,71,185,0.264,7
Mike Richardt,R,72,170,0.226,4
Chris Brown,R,72,185,0.269,38
Al Bumbry,L,68,170,0.281,54
Al Downing,R,71,175,0.127,2
Bob Didier,B,72,190,0.229,0
Jake Gibbs,L,72,180,0.233,25
Garry Hancock,L,72,175,0.247,12
Ed Kranepool,L,75,205,0.261,118
Rick Rhoden,R,75,195,0.238,9
Denny McLain,R,73,185,0.133,1
Chuck Hiller,L,71,170,0.243,20
Jorge Orta,L,70,170,0.278,130
Dave Cash,R,71,170,0.283,21
Bucky Dent,R,69,170,0.247,40
Andy Beene,R,75,205,0,0
Bruce Robbins,L,73,190,0,0
Tony Gonzalez,L,69,170,0.286,103
Leon Hooten,R,71,180,0,0
Larry Haney,R,74,195,0.215,12
Billy Conigliaro,R,72,180,0.256,40
Gary Roenicke,R,75,205,0.247,121
Don Lock,R,74,195,0.238,122
Billy Cowan,R,72,170,0.236,40
Billy Smith,B,74,185,0.23,17
Allan Ramirez,R,70,180,0,0
Tony Perez,R,74,175,0.279,379
Chuck Schilling,R,70,160,0.239,23
Hal McRae,R,71,180,0.29,191
Dave Roberts,R,75,215,0.239,49
Brian Allard,R,73,175,0,0
Jim Lefebvre,B,72,180,0.251,74
Fernando Arroyo,R,74,180,0,0
Gary Beare,R,76,205,0,0
Charlie Spikes,R,75,215,0.246,65
Brian Dubois,L,70,165,0,0
Steve Whitaker,L,72,180,0.23,24
Manny Jimenez,L,73,185,0.272,26
Chris Batton,R,76,195,0,0
Duffy Dyer,R,72,187,0.221,30
Ken Henderson,B,74,180,0.257,122
Vance Lovelace,L,77,205,0,0
Greg Thayer,R,71,182,0,0
Vern Fuller,R,73,170,0.232,14
Paul Hartzell,R,77,200,0,0
Wayne Gross,L,74,210,0.233,121
Mike Champion,R,72,185,0.229,2
Ralph Botting,L,72,195,0,0
Paul Casanova,R,76,180,0.225,50
Steve Rogers,R,74,175,0.138,0
Keith Creel,R,74,180,0,0
Terry Crowley,L,72,180,0.25,42
Horace Clarke,B,69,170,0.256,27
Lou Clinton,R,73,185,0.247,65
Larry Cox,R,70,178,0.221,12
Nate Colbert,R,74,190,0.243,173
Phil Roof,R,74,190,0.215,43
Chuck Hinton,R,73,180,0.264,113
Tim Cullen,R,73,185,0.22,9
Tim Harkness,L,74,182,0.235,14
Rick Bosetti,R,71,185,0.25,17
Ron Pruitt,R,72,185,0.269,12
George Foster,R,73,180,0.274,348
Jerry White,B,70,164,0.253,21
Angel Mangual,R,70,178,0.245,22
Ken Gerhart,R,72,190,0.221,24
Mike Hershberger,R,70,175,0.252,26
Jim French,L,68,180,0.196,5
Dave Roberts,L,75,195,0.194,7
Jim Mason,L,74,185,0.203,12
Mike Smith,R,75,180,0,0
Willie Smith,L,72,182,0.248,46
T.R. Bryden,R,76,190,0,0
Jose Arcia,R,75,170,0.215,1
Leon Durham,L,73,185,0.277,147
Tom Makowski,R,71,185,0,0
Paul Householder,B,72,180,0.236,29
Aurelio Rodriguez,R,70,180,0.237,124
Jimmy Stewart,B,72,165,0.237,8
Dick Phillips,L,72,180,0.229,12
Andres Thomas,R,73,170,0.234,42
Ed Crosby,L,74,175,0.22,0
Mike de la Hoz,R,71,175,0.251,25
Frank Taveras,R,72,155,0.255,2
Joe Nossek,R,72,178,0.228,3
Larry Stahl,L,72,175,0.232,36
Jose Cruz,L,72,170,0.284,165
Don Mason,L,71,160,0.205,3
Bill Robinson,R,74,189,0.258,166
Jim Umbarger,L,78,200,0,0
Sal Bando,R,72,195,0.254,242
George Mitterwald,R,74,195,0.236,76
Mike Darr,R,76,190,0,0
Craig Robinson,R,70,165,0.219,0
Bob Tillman,R,76,205,0.232,79
Curt Wardle,L,77,220,0,0
Pat Corrales,R,72,180,0.216,4
Mike Tyson,R,69,170,0.241,27
Rafael Landestoy,B,70,165,0.237,4
Duane Josephson,R,72,190,0.258,23
Duane Walker,L,72,185,0.229,24
Glenn Hubbard,R,69,150,0.244,70
Roger Freed,R,72,190,0.245,22
George Hendrick,R,75,195,0.278,267
Rod Carew,L,72,170,0.328,92
Bob Davis,R,72,180,0.197,6
Toby Harrah,R,72,175,0.264,195
Rick Manning,L,73,180,0.257,56
Israel Sanchez,L,69,170,0,0
Steve Burke,B,74,200,0,0
Gary Matthews,R,74,185,0.281,234
Cesar Geronimo,L,72,165,0.258,51
Billy Bryan,L,76,200,0.216,41
Terry Taylor,R,73,180,0,0
Terry Whitfield,L,73,197,0.281,33
Mario Mendoza,R,71,170,0.215,4
Fred Lynn,L,73,185,0.283,306
Larry Hisle,R,74,193,0.273,166
Graig Nettles,L,72,180,0.248,390
Randy Nosek,R,76,215,0,0
Dave Engle,R,75,210,0.262,31
Narciso Elvira,L,70,160,0,0
Mike Easler,L,72,190,0.293,118
Mark Smith,R,74,215,0,0
Paul Mitchell,R,73,195,0,0
Rick Sweet,B,73,200,0.234,6
Thurman Munson,R,71,190,0.292,113
Rick Monday,L,75,193,0.264,241
Mike Sadek,R,69,165,0.226,5
Mark Belanger,R,73,170,0.228,20
Ron Hunt,R,72,186,0.273,39
Joe Keough,L,72,185,0.246,9
Butch Edge,R,75,203,0,0
Vic Correll,R,70,185,0.229,29
Jackie Hernandez,R,71,165,0.208,12
Tony Solaita,L,72,210,0.255,50
U L Washington,B,71,175,0.251,27
Gary Mielke,R,75,185,0,0
Rick Henninger,R,78,225,0,0
Joe Foy,R,72,215,0.248,58
Ed Goodson,L,75,180,0.26,30
Mark Brown,B,74,190,0,0
Mickey Klutts,R,71,170,0.241,14
Leroy Stanton,R,73,195,0.244,77
Rafael Vasquez,R,72,160,0,0
Len Whitehouse,L,71,175,0,0
Danny Ainge,R,76,175,0.22,2
Adolfo Phillips,R,73,175,0.247,59
Marv Breeding,R,72,175,0.25,7
Steve Adkins,R,78,210,0,0
Dick McAuliffe,L,71,176,0.247,197
Joe Horlen,R,72,170,0.134,0
Glenn Burke,R,72,195,0.237,2
Tony Mack,R,70,177,0,0
Terry Humphrey,R,75,185,0.211,6
Bill Moran,R,76,210,0,0
Enzo Hernandez,R,68,155,0.224,2
Cesar Gutierrez,R,69,155,0.235,0
Coco Laboy,R,70,165,0.233,28
Ted Kubiak,B,72,175,0.231,13
Jim Morrison,R,71,175,0.26,112
Tom Gilles,R,73,185,0,0
Bobby Knoop,R,73,170,0.236,56
Bobby Brown,B,74,190,0.245,26
Tom Hutton,L,71,180,0.248,22
Ron Hodges,L,73,185,0.24,19
Rich Chiles,L,71,170,0.254,6
Tom Paciorek,R,76,215,0.282,86
Gary Woods,R,74,185,0.243,13
Bob Montgomery,R,73,195,0.258,23
Jeff Burroughs,R,73,200,0.261,240
Rusty Staub,L,74,190,0.279,292
Jim Norris,L,70,175,0.264,7
Oscar Gamble,L,71,160,0.265,200
Bob Kammeyer,R,76,210,0,0
George Vukovich,L,72,198,0.268,27
Joe Pactwa,L,71,185,0,0
Craig Reynolds,L,73,175,0.256,42
Paul Blair,R,72,168,0.25,134
Al Cowens,R,73,197,0.27,108
Al Oliver,L,72,195,0.303,219
Dave Hilton,R,71,191,0.213,6
Luis Alvarado,R,69,162,0.214,5
Larry Parrish,R,75,190,0.263,256
Woodie Fryman,R,75,197,0.138,2
Bob Randall,R,74,175,0.257,1
Jim Pankovits,R,70,170,0.25,9
Sherman Corbett,L,76,205,0,0
Carmen Fanzone,R,72,200,0.224,20
Gary Allenson,R,71,185,0.221,19
Milt May,L,72,190,0.263,77
Mike Vail,R,73,180,0.279,34
Nick Esasky,R,75,200,0.25,122
Jim Nettles,L,72,186,0.22,16
Lafayette Currence,B,71,175,0,0
Chris Cannizzaro,R,72,190,0.235,18
Larry Biittner,L,74,205,0.273,29
John Pawlowski,R,74,175,0,0
Mel Stottlemyre,R,73,178,0.16,7
Jack Hardy,R,74,175,0,0
Ron Musselman,R,74,185,0,0
Roy Smalley,B,73,185,0.257,163
Tony Chevez,R,71,177,0,0
Andy Messersmith,R,73,200,0.17,5
Richie Zisk,R,73,200,0.287,207
Dave Chalk,R,70,175,0.252,15
Don Baylor,R,73,190,0.26,338
John Vukovich,R,73,187,0.161,6
Danny Thompson,R,72,183,0.248,15
Joe Simpson,L,75,175,0.242,9
Bill Fahey,L,72,200,0.241,7
Doug Camilli,R,71,195,0.199,18
Bernie Allen,L,72,175,0.239,73
Bruce Bochy,R,75,205,0.239,26
Gary Ignasiak,R,71,185,0,0
Claudell Washington,L,72,190,0.278,164
John Donaldson,L,71,160,0.238,4
Mike Smithson,L,80,215,0,0
John Mayberry,L,75,215,0.253,255
Ken Reitz,R,72,180,0.26,68
Amos Otis,R,71,165,0.277,193
Gene Alley,R,70,160,0.254,55
Ted Sizemore,R,70,165,0.262,23
Dan Briggs,L,72,180,0.195,12
Joe Skalski,R,75,190,0,0
Doug Flynn,R,71,165,0.238,7
Bert Bradley,B,73,190,0,0
Ken Holtzman,R,74,175,0.163,2
Pete Ward,L,73,185,0.254,98
Kevin Bell,R,72,195,0.222,13
Tom Nieto,R,73,193,0.205,5
Duke Sims,L,74,197,0.239,100
Larvell Blanks,R,68,167,0.253,20
Francisco Barrios,R,71,155,0,0
Mike Davis,L,74,175,0.259,91
Jerry Reuss,L,77,200,0.167,1
Steve Yeager,R,72,190,0.228,102
Danny Goodwin,L,73,195,0.236,13
Bud Harrelson,B,71,160,0.236,7
Bob Knepper,L,75,195,0.137,6
Mickey Rivers,L,70,165,0.295,61
Jim Northrup,L,75,190,0.267,153
John Hale,L,74,195,0.201,14
Reggie Ritter,L,74,195,0,0
Pedro Garcia,R,70,175,0.22,37
Carl Yastrzemski,L,71,175,0.285,452
Bob Babcock,R,77,210,0,0
Craig Eaton,R,71,175,0,0
Derrel Thomas,B,72,160,0.249,43
Art Howe,R,74,190,0.26,43
Ike Brown,R,72,190,0.256,20
Howie Goss,R,76,204,0.216,11
Glenn Borgmann,R,76,210,0.229,16
Lamar Johnson,R,74,215,0.287,64
Julio Gonzalez,R,71,162,0.235,4
Bobby Klaus,R,70,170,0.208,6
Manny Sanguillen,R,72,193,0.296,65
Gates Brown,L,71,220,0.257,84
Johnny Ray,B,71,170,0.29,53
Jesus Alou,R,74,190,0.28,32
Ken Landreaux,L,70,165,0.268,91
Enos Cabell,R,76,170,0.277,60
Roy Branch,R,72,175,0,0
Billy North,B,71,185,0.261,20
Juan Beniquez,R,71,150,0.274,79
Frank Fernandez,R,72,185,0.199,39
Bombo Rivera,R,70,187,0.265,10
Steve Brye,R,72,190,0.258,30
Ron Jackson,R,72,200,0.259,56
Roger Metzger,B,72,165,0.231,5
Rufino Linares,R,72,170,0.27,11
Ray Webster,L,72,185,0.244,17
Bob Kearney,R,72,190,0.233,27
Fergie Jenkins,R,77,205,0.165,13
Dick Dietz,R,73,195,0.261,66
Ted Cox,R,75,195,0.245,10
Bobby Mitchell,L,70,170,0.243,3
Bobby Mitchell,R,75,185,0.235,21
Barry Evans,R,73,180,0.251,2
Mickey Brantley,R,70,180,0.259,32
Al Gallagher,R,72,180,0.263,11
Rob Woodward,R,75,185,0,0
Hector Cruz,R,71,170,0.225,39
Fred Norman,B,68,155,0.125,0
Woody Woodward,R,74,180,0.236,1
Ted Martinez,R,72,165,0.24,7
Jim Anderson,R,72,170,0.218,13
Lenn Sakata,R,69,160,0.23,25
Dave Duncan,R,74,190,0.214,109
Randy Jones,R,72,178,0.132,0
Dick Billings,R,73,195,0.227,16
Bob Veselic,R,72,175,0,0
Bruce Bochte,L,75,195,0.282,100
Bernie Carbo,L,71,173,0.264,96
Vic Davalillo,L,67,150,0.279,36
Burt Hooton,R,73,210,0.123,4
Chuck Hockenbery,B,73,195,0,0
Bob Ferris,R,78,225,0,0
Fernando Gonzalez,R,70,165,0.235,17
Jim Sundberg,R,72,190,0.248,95
Andy Kosco,R,75,205,0.236,73
Steve Huntz,B,73,204,0.206,16
Gary Wheelock,R,75,205,0,0
Lenny Faedo,R,72,170,0.251,5
John Lowenstein,L,72,175,0.253,116
Don Kessinger,B,73,170,0.252,14
Joe Hague,L,72,195,0.239,40
Bake McBride,L,74,190,0.299,63
Dick Davis,R,75,190,0.265,27
Richie Scheinblum,B,73,180,0.263,13
Ed Herrmann,L,73,195,0.24,80
Mike Rochford,L,76,205,0,0
Jeff Schneider,B,75,195,0,0
Bob Molinaro,L,72,190,0.264,14
Mike Hegan,L,73,188,0.242,53
Mike Diaz,R,74,195,0.247,31
Tim Foli,R,72,179,0.251,25
Alan Knicely,R,72,190,0.213,12
Tim Laudner,R,75,212,0.225,77
Jose Morales,R,71,187,0.287,26
Luis Encarnacion,R,70,178,0,0
Rick Kreuger,R,74,185,0,0
Juan Marichal,R,72,185,0.165,4
Vida Blue,B,72,189,0.104,4
Angel Moreno,L,69,165,0,0
Roger Weaver,R,75,190,0,0
Stan Papi,R,72,170,0.218,7
Rob Wilfong,L,73,180,0.248,39
Chris Knapp,R,77,195,0,0
Steve Henderson,R,74,190,0.28,68
Rob Picciolo,R,74,185,0.234,17
Don Welchel,R,76,205,0,0
Randy Wiles,L,73,185,0,0
Roberto Pena,R,68,170,0.245,13
Bob Dernier,R,72,160,0.255,23
Bill Melton,R,74,200,0.253,160
Albert Hall,B,71,155,0.251,5
Barbaro Garbey,R,70,170,0.267,11
John Milner,L,72,185,0.249,131
Rich Reese,L,75,185,0.253,52
Chris Bando,B,72,195,0.227,27
Bill Buckner,L,72,185,0.289,174
Jack Hiatt,R,74,190,0.251,22
Nelson Mathews,R,76,195,0.223,22
Larry Lintz,B,69,150,0.227,0
Ron Theobald,R,68,165,0.248,2
Dewey Robinson,R,72,180,0,0
Rafael Santana,R,73,165,0.246,13
Jerry Hairston,B,70,170,0.258,30
Tony Arnold,R,71,170,0,0
Jeff Schattinger,L,77,200,0,0
Ike Brookens,R,77,170,0,0
Tommie Aaron,R,75,190,0.229,13
Steve Dillard,R,73,180,0.243,13
Win Remmerswaal,R,74,160,0,0
Jeff Peterek,R,74,195,0,0
George Scott,R,74,200,0.268,271
Jeff Shaver,R,75,195,0,0
Ken Walters,R,73,180,0.231,11
Gorman Thomas,R,74,210,0.225,268
Paul Dade,R,73,185,0.27,10
Darrell Porter,L,72,193,0.247,188
Tim Johnson,L,73,170,0.223,0
Fred Stanley,R,70,165,0.216,10
Larry Bowa,B,70,155,0.26,15
Tim Corcoran,L,71,175,0.27,12
Jim Spencer,L,74,195,0.25,146
Pete LaCock,L,74,200,0.257,27
Carl Morton,R,72,200,0.156,7
Gary Gray,R,72,187,0.24,24
Matty Alou,L,69,160,0.307,31
Pete Filson,B,74,195,0,0
Jim Dwyer,L,70,165,0.26,77
Dalton Jones,L,73,180,0.235,41
Rennie Stennett,R,71,160,0.274,41
Jim Gideon,R,75,190,0,0
Jerry May,R,74,190,0.234,15
Rich McKinney,R,71,185,0.225,20
Clint Hurdle,L,75,195,0.259,32
Mike Andrews,R,75,195,0.258,66
Bobby Clark,R,72,190,0.239,19
Jeff Twitty,L,74,185,0,0
Cliff Johnson,R,76,215,0.258,196
Steve Cummings,B,74,200,0,0
Donn Clendenon,R,76,209,0.274,159
Charlie James,R,73,195,0.255,29
Bob Horner,R,73,195,0.277,218
Tom Veryzer,R,73,175,0.241,14
Jose Cecena,R,71,180,0,0
George Smith,R,70,170,0.205,9
Jim Essian,R,74,195,0.244,33
Onix Concepcion,R,66,160,0.239,3
Boots Day,L,69,160,0.256,8
Brian Giles,R,73,165,0.228,10
Garry Maddox,R,75,175,0.285,117
Alex Trevino,R,70,165,0.249,23
Jim Price,R,72,192,0.214,18
Felix Millan,R,71,172,0.279,22
Steve Garvey,R,70,192,0.294,272
Don Mincher,L,75,205,0.249,200
Greg Erardi,R,73,190,0,0
Jim Farr,R,73,195,0,0
Tony Cloninger,R,72,210,0.192,11
Jim Gosger,L,71,185,0.226,30
Chuck Harrison,R,70,185,0.238,17
Mike Ivie,R,75,205,0.269,81
Frank Dimichele,R,75,205,0,0
Bob Veale,B,78,212,0.114,0
Marvell Wynne,L,71,175,0.247,40
Dusty Baker,R,74,183,0.278,242
Tucker Ashford,R,73,195,0.218,6
Ned Yost,R,73,190,0.212,16
Bob Stinson,B,71,180,0.25,33
Mike Warren,R,73,175,0,0
Gaylord Perry,R,76,205,0.131,6
Dave Marshall,L,73,182,0.246,16
Mickey Hatcher,R,74,200,0.28,38
Roger Repoz,L,75,190,0.224,82
Bill Fulton,R,75,195,0,0
John Orsino,R,75,215,0.249,40
Larry Anderson,R,75,190,0,0
Johnny Briggs,L,73,190,0.253,139
Craig Mitchell,R,75,180,0,0
Dave Hostetler,R,76,215,0.229,37
Bob Jones,L,74,195,0.221,20
Keith Hernandez,L,72,180,0.296,162
Alfredo Martinez,R,75,185,0,0
Dean Chance,R,75,200,0.066,0
Willie Upshaw,L,72,185,0.262,123
Dick Green,R,70,180,0.24,80
Dane Iorg,L,72,180,0.276,14
Richie Hebner,L,73,195,0.276,203
Fran Healy,R,77,220,0.25,20
Doc Edwards,R,74,215,0.238,15
Sandy Alomar,B,69,140,0.245,13
Joe Strain,R,70,169,0.25,1
Gene Richards,L,72,175,0.29,26
Buddy Bell,R,73,180,0.279,201
Al Woods,L,75,190,0.271,35
Rudy Law,L,73,165,0.271,18
Joel Davis,L,77,205,0,0
Jody Davis,R,76,192,0.245,127
Mike Edwards,R,70,154,0.25,2
Bill Mooneyham,R,72,175,0,0
John Hobbs,R,75,190,0,0
Deron Johnson,R,74,200,0.244,245
John Denny,R,75,185,0.17,0
Don Wert,R,70,162,0.242,77
Mike Fiore,L,72,175,0.227,13
Miguel Dilone,B,72,160,0.265,6
Greg Luzinski,R,73,220,0.276,307
Bobby Tolan,L,71,170,0.265,86
Karl Best,R,76,190,0,0
Steve Barr,L,76,200,0,0
Ron Woods,R,70,168,0.233,26
Tony Horton,R,75,210,0.268,76
Randy Hundley,R,71,170,0.236,82
Jose Tartabull,L,71,165,0.261,2
Ben Oglivie,L,74,160,0.273,235
Luis Sanchez,R,74,170,0,0
Bob Johnson,R,70,175,0.272,44
Don Buford,B,67,160,0.264,93
Duane Kuiper,L,72,175,0.271,1
Brant Alyea,R,75,215,0.247,38
Jerry Narron,L,75,205,0.211,21
Lou Johnson,R,71,170,0.258,48
Ken Retzer,L,72,185,0.264,14
Mike Brown,R,74,195,0.265,23
Mike Brown,R,74,195,0,0
Greg Walker,L,75,205,0.26,113
Terry Harper,R,76,195,0.253,36
Jerry Royster,R,72,165,0.249,40
Steve Davis,L,73,195,0,0
Jeff Rineer,L,76,205,0,0
Barry Bonnell,R,75,190,0.272,56
Tom Seaver,R,73,195,0.154,12
Jerry Martin,R,73,195,0.251,85
Bill Stein,R,70,170,0.267,44
Joel Youngblood,R,72,180,0.265,80
Reggie Jackson,L,72,195,0.262,563
Sonny Jackson,L,69,150,0.251,7
Mark Mercer,L,77,220,0,0
Rodney Scott,B,72,160,0.236,3
Rich Coggins,L,68,170,0.265,12
Phil Gagliano,R,73,180,0.238,14
Jerry McNertney,R,72,180,0.237,27
Mitchell Page,L,74,205,0.266,72
Kiko Garcia,R,71,180,0.239,12
Larry Milbourne,B,72,161,0.254,11
Bill Sudakis,B,73,190,0.234,59
John Caneira,R,75,180,0,0
Domingo Ramos,R,70,154,0.24,8
Ron Oester,B,74,185,0.265,42
Glenn Adams,L,73,180,0.28,34
Clint Zavaras,R,73,175,0,0
Joe Morgan,L,67,160,0.271,268
R.J. Reynolds,B,72,190,0.267,35
Mike Parrott,R,76,210,0,0
Lee Thomas,L,74,195,0.255,106
Ray Fosse,R,74,215,0.256,61
Paul Popovich,B,72,175,0.233,14
John Stephenson,L,71,180,0.216,12
Doug Clemens,L,72,180,0.229,12
Luis Aponte,R,72,185,0,0
Orlando Mercado,R,72,180,0.199,7
Charley Smith,R,73,170,0.239,69
Paul Boris,R,74,200,0,0
Buddy Biancalana,B,71,160,0.205,6
De Wayne Buice,R,72,170,0,0
Bob Uecker,R,73,190,0.2,14
Felix Torres,R,71,165,0.254,27
Steve Braun,L,70,180,0.271,52
Ray Knight,R,73,185,0.271,84
Ty Cline,L,72,170,0.238,6
Thad Bosley,L,75,175,0.272,20
Bobby Grich,R,74,180,0.266,224
Jimmie Hall,L,72,175,0.254,121
John Boccabella,R,73,195,0.219,26
Brock Davis,L,70,160,0.26,1
Mark Esser,R,73,190,0,0
Curt Blefary,L,74,195,0.237,112
Daryl Smith,R,76,185,0,0
Dave Smith,R,73,190,0,0
Mack Jones,L,73,180,0.252,133
Buddy Bradford,R,71,170,0.226,52
Hosken Powell,L,73,175,0.259,17
Dave Stapleton,L,73,185,0,0
Dave Stapleton,R,73,178,0.271,41
Gary Ward,R,74,195,0.276,130
Jim Lonborg,R,77,200,0.136,3
Joe Lis,R,72,175,0.233,32
Dan Meyer,L,71,180,0.253,86
Jim Holt,L,72,180,0.265,19
Tom Klawitter,R,74,190,0,0
Larry Herndon,R,75,190,0.274,107
Gary Christenson,L,77,200,0,0
Jim Wright,R,77,205,0,0
Jim Wright,R,73,165,0,0
Wallace Johnson,B,72,173,0.255,5
Mike Kinnunen,L,73,185,0,0
Eddie Leon,R,72,170,0.236,24
Dave Rajsich,L,77,175,0,0
Jim Wohlford,R,71,175,0.26,21
J.R. Richard,R,80,222,0.168,10
Bill Voss,L,74,160,0.227,19
Keith Moreland,R,72,190,0.279,121
Ramon Pena,R,70,155,0,0
Alex Johnson,R,72,205,0.288,78
Wayne Krenchicki,L,73,180,0.266,15
Chico Escarrega,R,71,185,0,0
Dave Rosello,R,71,160,0.236,10
Cardell Camper,R,75,208,0,0
Paul Schaal,R,71,165,0.244,57
Tito Landrum,R,71,175,0.249,13
Dave Edwards,R,72,170,0.237,14
Mario Guerrero,R,70,155,0.257,7
Tom Tresh,B,73,180,0.245,153
Mike Overy,R,74,190,0,0
Ron Roenicke,B,72,180,0.238,17
Doug Griffin,R,72,160,0.245,7
Steve Blass,R,72,165,0.172,1
Johnnie LeMaster,R,74,165,0.222,22
Craig Chamberlain,R,73,190,0,0
Nate Oliver,R,70,160,0.226,2
Ray Sadecki,L,71,180,0.191,5
Ken Rudolph,R,73,180,0.213,6
Wayne Nordhagen,R,74,205,0.282,39
Biff Pocoroba,B,70,175,0.257,21
Len Matuszek,L,74,190,0.234,30
Frank Eufemia,R,71,185,0,0
Joe Lefebvre,L,70,170,0.258,31
Jim Maloney,L,74,190,0.201,7
Andre Robertson,R,70,155,0.251,5
Jerry Zimmerman,R,74,185,0.204,3
Jack Lazorko,R,71,200,0,0
Mike Paxton,R,71,190,0,0
Chet Lemon,R,72,190,0.273,215
Rickey Keeton,R,74,190,0,0
Phil Mankowski,L,72,180,0.264,8
Cleon Jones,R,72,185,0.281,93
Joaquin Andujar,B,72,170,0.127,5
Mike Lum,L,72,180,0.247,90
Johnny Grubb,L,75,175,0.278,99
Curt Motton,R,68,164,0.213,25
Johnny Bench,R,73,197,0.267,389
Dale Berra,R,72,180,0.236,49
Terry Felton,R,73,180,0,0
Bob Meacham,B,73,175,0.236,8
Mark Clear,R,76,200,0,0
Carl Warwick,R,70,170,0.248,31
Sam Bowens,R,73,188,0.223,45
George Wright,B,71,180,0.245,42
Luis Aguayo,R,69,173,0.236,37
Hal Lanier,R,74,180,0.228,8
Mike Pazik,L,74,195,0,0
Len Randle,B,70,169,0.257,27
Greg Pryor,R,72,180,0.25,14
Jim Traber,L,72,194,0.227,27
Dave Nelson,R,70,160,0.244,20
Lynn Jones,R,69,175,0.252,7
Bryan Little,B,70,160,0.245,3
Ken Suarez,R,69,175,0.227,5
Rick Peters,B,69,170,0.277,2
Ron Stone,L,74,185,0.241,6
Rich Barnes,R,76,186,0,0
Tommie Agee,R,71,195,0.255,130
Bob Bailey,R,73,180,0.257,189
Cap Peterson,R,74,195,0.23,19
Ted Uhlaender,L,74,190,0.263,36
Ted Simmons,B,71,193,0.285,248
Bobby Murcer,L,71,160,0.277,252
Dick Tracewski,R,71,160,0.213,8
Dave Frost,R,78,235,0,0
Mark Souza,L,72,180,0,0
Bill Nahorodny,R,74,200,0.241,25
Bill Madlock,R,71,180,0.305,163
Bob Boone,R,74,195,0.254,105
Rick Jones,L,77,190,0,0
Steve Kemp,L,72,195,0.278,130
Rick Burleson,R,70,165,0.273,50
Jim Dorsey,R,79,190,0,0
Mark Ciardi,R,72,180,0,0
Dennis Burtt,R,72,180,0,0
Carl Taylor,R,74,200,0.266,10
Terry Harmon,R,74,180,0.233,4
Mike Hargrove,L,72,195,0.29,80
Rich Yett,R,74,187,0,0
Steve Hovley,L,70,188,0.258,8
Don Leppert,R,74,220,0.229,15
Matt Williams,R,73,200,0,0
Jim Burton,R,75,195,0,0
Rick Anderson,R,74,210,0,0
Charlie Mitchell,R,75,170,0,0
Bill Paschall,R,72,175,0,0
John Bohnet,B,72,175,0,0
Byron McLaughlin,R,73,175,0,0
Lee May,R,75,195,0.267,354
Luis Quintana,L,74,175,0,0
Sam McDowell,L,77,190,0.154,2
Rick Renick,R,72,188,0.221,20
Jeff Torborg,R,72,195,0.214,8
Dave Campbell,R,73,180,0.213,20
Pat Kelly,L,73,185,0.264,76
Al Weis,B,72,160,0.219,7
Jerry Turner,L,69,180,0.257,45
Rick Auerbach,R,72,165,0.22,9
Keith Macwhorter,R,76,190,0,0
Don Wilson,R,74,195,0.146,1
Jaime Cocanower,R,76,200,0,0
Jeff Sellers,R,73,175,0,0
Sandy Valdespino,L,68,170,0.23,7
Steve Senteney,R,74,205,0,0
Howard Bailey,R,72,195,0,0
Jeff Bettendorf,R,75,180,0,0
Ken Phelps,L,73,209,0.239,123
Cesar Cedeno,R,74,175,0.285,199
Bob Davidson,R,72,185,0,0
Phil Linz,R,73,180,0.235,11
Manny Mota,R,70,160,0.304,31
Brian Snyder,L,75,185,0,0
Steve Renko,R,77,230,0.215,6
Rick Sofield,L,73,195,0.243,9
Carlos Velazquez,R,71,180,0,0
Roger Miller,R,75,200,0,0
Doug DeCinces,R,74,190,0.259,237
John Castino,R,71,175,0.278,41
Dave May,L,70,186,0.251,96
Ron Washington,R,71,155,0.261,20
Billy Grabarkewitz,R,70,165,0.236,28
Willie Aikens,L,75,220,0.271,110
Earl Williams,R,75,215,0.247,138
Willie Mueller,R,76,220,0,0
John Flinn,R,72,175,0,0
Don Hahn,R,73,180,0.236,7
Todd Cruz,R,72,175,0.22,34
Tom Egan,R,76,218,0.2,22
Bob Heise,R,72,175,0.247,1
Tommy Harper,R,69,165,0.257,146
Joe Wallis,B,71,180,0.244,16
Max Alvis,R,71,185,0.247,111
Rico Carty,R,75,200,0.299,204
Mike Cubbage,L,72,180,0.258,34
Les Straker,R,73,193,0,0
Merritt Ranew,L,71,170,0.247,8
Lyman Bostock,L,73,180,0.311,23
Damaso Garcia,R,73,165,0.283,36
Don Kainer,R,75,205,0,0
Don Gordon,R,73,175,0,0
Roy Howell,L,73,190,0.261,80
Boog Powell,L,76,230,0.266,339
Sandy Wihtol,R,73,195,0,0
Sonny Siebert,R,75,190,0.173,12
Jeff Richardson,R,75,185,0,0
Bobby Darwin,R,74,190,0.251,83
Dennis DeBarr,L,74,190,0,0
Dan Driessen,L,71,187,0.267,153
Bruce Miller,R,73,185,0.246,1
Bob Bailor,R,71,170,0.264,9
Tommy Helms,R,70,165,0.269,34
Tony Armas,R,71,182,0.252,251
Willie Horton,R,71,209,0.273,325
Lou Piniella,R,72,182,0.291,102
Butch Hobson,R,73,193,0.248,98
John Wathan,R,74,205,0.262,21
Hal King,L,73,200,0.214,24
Mike Krukow,R,77,205,0.193,5
Andres Mora,R,72,180,0.223,27
Barry Foote,R,75,205,0.23,57
Ed Ott,L,70,190,0.259,33
Alan Wiggins,B,74,160,0.259,5
Ron Clark,R,70,175,0.189,5
Jay Pettibone,R,76,182,0,0
Glen Cook,R,71,180,0,0
Julio Gotay,R,72,180,0.26,6
Gary Alexander,R,74,195,0.23,55
Andre Thornton,R,75,200,0.254,253
Bob Oliver,R,75,205,0.256,94
Bill Castro,R,71,170,0,0
Ed Hodge,L,74,192,0,0
Tom Buskey,R,75,200,0,0
Bruce Taylor,R,72,178,0,0
Stan Thomas,R,74,185,0,0
Bob Robertson,R,73,195,0.242,115
Larry Monroe,R,76,200,0,0
Roger Slagle,R,75,190,0,0
Ollie Brown,R,74,178,0.265,102
Jim Campbell,L,71,175,0,0
Frank Quilici,R,73,170,0.214,5
Curt Kaufman,R,74,175,0,0
Joe Pepitone,L,74,185,0.258,219
Steve Barber,L,72,195,0.115,5
De Wayne Vaughn,R,71,180,0,0
Norm Miller,L,70,185,0.238,24
Bob Galasso,L,73,205,0,0
Rich Wortham,R,72,185,0,0
Bob Chance,L,74,196,0.261,24
Julio Cruz,B,69,165,0.237,23
Bill Sample,R,69,175,0.272,46
Juan Nieves,L,75,175,0,0
Mike Bacsik,R,74,180,0,0
Craig Kusick,R,75,210,0.235,46
Rudy Meoli,L,69,165,0.212,2
Ruppert Jones,L,70,170,0.25,147
Glenn Hoffman,R,73,175,0.242,23
Russ Gibson,R,73,195,0.228,8
Phil Huffman,R,74,180,0,0
Terry Francona,L,73,190,0.274,16
John Bateman,R,75,210,0.23,81
Luis Pujols,R,74,175,0.193,6
Joe Gaines,R,73,190,0.241,21
Doug Rader,R,74,208,0.251,155
Mickey Stanley,R,73,185,0.248,117
Steve Brown,R,77,200,0,0
Rick Lysander,R,74,190,0,0
Phil Bradley,R,72,185,0.286,78
Winston Llenas,R,70,165,0.23,3
Charlie Moore,R,71,180,0.261,36
Ralph Garr,L,71,185,0.306,75
Tommy John,R,75,180,0.157,5
Bruce Benedict,R,73,175,0.242,18
John Ellis,R,74,225,0.262,69
Wes Parker,B,73,180,0.267,64
Mel Stottlemyre,R,72,190,0,0
David Green,R,75,170,0.268,31
Reid Nichols,R,71,165,0.266,22
Rick Reichardt,R,75,210,0.261,116
Luis Tiant,R,72,180,0.164,5
Alex Sanchez,R,74,185,0,0
Broderick Perkins,L,70,180,0.271,8
Leon Roberts,R,75,200,0.267,78
Ray Burris,R,77,200,0.151,1
Len Gabrielson,L,76,210,0.253,37
Johnny Edwards,L,76,220,0.242,81
Paul Wilmet,R,71,170,0,0
Tom Grieve,R,74,190,0.249,65
Bruce Ellingsen,L,72,180,0,0
Bob Forsch,R,76,200,0.213,12
Gorman Heimueller,L,76,195,0,0
Danny Cater,R,72,170,0.276,66
Bill Schroeder,R,74,200,0.24,61
Clay Dalrymple,L,72,190,0.233,55
Carlos May,L,71,200,0.274,90
Reggie Smith,B,72,180,0.287,314
Ron Reed,R,78,215,0.158,0
Fred Howard,R,75,190,0,0
Davey Johnson,R,73,170,0.261,136
Ellis Valentine,R,76,205,0.278,123
Roy White,B,70,160,0.271,160
Mike Brumley,L,70,195,0.229,5
Al Luplow,L,70,175,0.235,33
John Hoover,R,74,190,0,0
Dick Allen,R,71,187,0.292,351
Doug Ault,R,75,200,0.236,17
Mark Wagner,R,72,165,0.243,3
Mike Walters,R,77,203,0,0
Willie Stargell,L,74,188,0.282,475
Steve Carlton,L,76,210,0.201,13
Jake Wood,R,73,163,0.25,35
Del Unser,L,73,180,0.258,87
Bob Brower,R,71,185,0.242,17
Ray Culp,R,72,200,0.123,1
Ivan Murrell,R,74,195,0.236,33
Lee Mazzilli,B,73,180,0.259,93
Garth Iorg,R,71,170,0.258,20
Alan Ashby,B,74,185,0.245,90
Bob Brenly,R,74,210,0.247,91
Ron Blomberg,L,73,195,0.293,52
Jim Rooker,R,72,195,0.201,7
Tim Blackwell,B,71,170,0.228,6
Colby Ward,R,74,185,0,0
Jerry Morales,R,70,155,0.259,95
Davey Lopes,R,69,170,0.263,155
Catfish Hunter,R,72,190,0.226,6
Mario Soto,R,72,174,0.132,1
Jimmy Wynn,R,70,160,0.25,291
Hank Allen,R,72,190,0.241,6
Jim Fregosi,R,73,190,0.265,151
Pepe Frias,R,70,159,0.24,1
Mike Schmidt,R,74,195,0.267,548
Willie Montanez,L,72,170,0.275,139
Rey Quinones,R,71,160,0.243,29
Mike Squires,L,71,185,0.26,6
Champ Summers,L,74,205,0.255,54
Chuck Porter,R,75,187,0,0
Bert Campaneris,R,70,160,0.259,79
Bobby Valentine,R,70,189,0.26,12
Rob Andrews,R,72,185,0.251,3
Tom Haller,L,76,195,0.257,134
Tom Dozier,R,74,190,0,0
Ed Stroud,L,71,180,0.237,14
Ron Swoboda,R,74,195,0.242,73
Harry Spilman,L,73,180,0.237,18
Bob Barton,R,72,175,0.226,9
Daryl Sconiers,L,74,185,0.265,15
Joe Torre,R,74,212,0.297,252
Al Ferrara,R,73,200,0.259,51
Rick Steirer,R,76,200,0,0
Sixto Lezcano,R,70,165,0.271,148
Al Lachowicz,R,75,198,0,0
Dave Nicholson,R,74,215,0.212,61
Freddie Patek,R,65,148,0.242,41
Ken Hubbs,R,74,175,0.247,14
Pepe Mangual,R,70,157,0.242,16
Leron Lee,L,72,196,0.25,31
Tom McCarthy,R,72,180,0,0
Steve Ontiveros,B,72,185,0.274,24
Willie Davis,L,74,180,0.279,182
Tom Lawless,R,71,170,0.207,2
Jerry Moses,R,75,210,0.251,25
Bobby Bonds,R,73,190,0.268,332
Dave McNally,R,71,185,0.133,9
Darrell Brown,B,72,184,0.274,1
Roy Foster,R,72,185,0.253,45
Denis Menke,R,72,185,0.25,101
Hal Breeden,R,74,200,0.243,21
Manny Trillo,R,73,150,0.263,61
Jackie Gutierrez,R,71,175,0.237,4
Jerry Kenney,L,73,170,0.237,7
Fred Kendall,R,73,185,0.234,31
Mike Anderson,R,74,200,0.246,28
Jim Lewis,R,75,190,0,0
Joe Charboneau,R,74,205,0.266,29
Jimmie Schaffer,R,69,170,0.223,11
Junior Kennedy,R,71,175,0.248,4
Wilbur Howard,B,74,170,0.25,6
Rod Gilbreath,R,74,180,0.248,14
Mark Brouhard,R,73,210,0.259,25
Dan Morogiello,L,73,200,0,0
Mike Young,B,74,195,0.247,72
Chris Speier,R,73,175,0.246,112
Gene Michael,B,74,183,0.229,15
Vic Harris,B,71,165,0.217,13
Mike Fischlin,R,73,165,0.22,3
Don Money,R,73,170,0.261,176
Joe Rudi,R,74,200,0.264,179
Jim Rice,R,74,200,0.298,382
Shawn Holman,R,74,185,0,0
Alan Wirth,R,76,190,0,0
Gil Garrido,R,69,150,0.237,1
Marty Perez,R,71,160,0.246,22
Tom Matchick,L,73,173,0.215,4
Jack Perconte,L,70,160,0.27,2
Ed Kirkpatrick,L,71,195,0.238,85
Jerry Grote,R,70,185,0.252,39
Ellie Hendricks,L,73,175,0.22,62
Jim Beauchamp,R,74,190,0.231,14
Terry Wilshusen,R,74,210,0,0
Tito Fuentes,B,71,175,0.268,45
Ron Brand,R,67,167,0.239,3
Leo Cardenas,R,71,150,0.257,118
Art Shamsky,L,73,168,0.253,68
Steve Ellsworth,R,80,220,0,0
Ron Cey,R,70,185,0.261,316
Skip Jutze,R,71,190,0.215,3
Butch Wynegar,B,73,190,0.255,65
Ron LeFlore,R,72,200,0.288,59
Bill Russell,R,72,175,0.263,46
Gene Tenace,R,72,190,0.241,201
Bubba Morton,R,70,175,0.267,14
Ellie Rodriguez,R,71,185,0.245,16
Darrel Chaney,B,74,188,0.217,14
Dick Nen,L,74,200,0.224,21
Bryan Kelly,R,74,195,0,0
Bill Freehan,R,75,203,0.262,200
Steve Nicosia,R,70,185,0.248,11
Ted Savage,R,73,185,0.233,34
Pete Mackanin,R,74,190,0.226,30
Rich Dauer,R,72,180,0.257,43
Mick Kelleher,R,69,176,0.213,0
Rowland Office,L,72,170,0.259,32
Rick Leach,L,73,180,0.268,18
Dwayne Murphy,L,73,185,0.246,166
Larry Harlow,L,74,185,0.248,12
Mike Epstein,L,75,230,0.244,130
Jerry Mumphrey,B,74,185,0.289,70
Don Sutton,R,73,185,0.144,0
Glenn Beckert,R,73,190,0.283,22
Ron Davis,R,72,175,0.233,10
Mike Shannon,R,75,195,0.255,68
Jason Thompson,L,76,200,0.261,208
Wayne Tolleson,B,69,160,0.241,9
John Leister,R,74,200,0,0
Don Cooper,R,73,185,0,0
Mike Jorgensen,L,72,195,0.243,95
Ed Romero,R,71,160,0.247,8
Rick Joseph,R,73,192,0.243,13
Cecil Cooper,L,74,165,0.298,241
Bill Almon,R,75,180,0.254,36
Joe Ferguson,R,74,200,0.24,122
Jeff Jones,R,75,210,0,0
Jerry Terrell,R,71,165,0.253,4
John Poloni,L,77,210,0,0
Dave Revering,L,76,210,0.265,62
Curt Ford,L,70,150,0.245,7
Jerry Dybzinski,R,74,180,0.234,3
Mike Willis,L,74,205,0,0
Bob Burda,L,71,174,0.224,13
Jesse Gonder,L,70,180,0.251,26
Gary Sutherland,R,72,185,0.243,24
Bob Coluccio,R,71,183,0.22,26
Dave Rader,L,71,165,0.257,30
Ron Gardenhire,R,72,175,0.232,4
Bill Sharp,L,70,178,0.255,9
Alan Bannister,R,71,170,0.27,19
Bob Watson,R,72,201,0.295,184
Ken Harrelson,R,74,190,0.239,131
Bobby Wine,R,73,187,0.215,30
Stefan Wever,R,80,245,0,0
John Kennedy,R,72,185,0.225,32
Chico Ruiz,B,72,169,0.24,2
Dave Johnson,R,73,183,0,0
Gail Hopkins,L,70,198,0.266,25
Doug Frobel,L,76,196,0.201,20
Luis Melendez,R,72,165,0.248,9
Jerry Augustine,L,72,183,0,0
Bill Plummer,R,73,190,0.188,14
Buck Rodgers,B,74,190,0.232,31
Phil Niekro,R,73,180,0.169,7
Jeff Holly,L,77,210,0,0
Tom Poquette,L,70,175,0.268,10
Eric Hetzel,R,75,175,0,0
Brian Asselstine,L,73,175,0.254,12
Rick Miller,L,72,175,0.269,28
Ed Charles,R,70,170,0.263,86
Luis Gomez,R,69,150,0.21,0
Dave Lemanczyk,R,76,235,0,0
Al Jones,R,76,210,0,0
Floyd Rayford,R,70,190,0.244,38
Sam Hinds,R,78,215,0,0
Tony Conigliaro,R,75,185,0.264,166
Clay Christiansen,R,77,205,0,0
Jim Barr,R,75,205,0.162,1
Jerry Remy,L,69,165,0.275,7
Larry Rothschild,L,74,180,0,0
Frank Duffy,R,73,180,0.232,26
Gary Lance,B,75,195,0,0
Tom O'Malley,L,72,180,0.256,13
Phil Garner,R,70,175,0.26,109
Larry Pashnick,R,75,205,0,0
Todd Fischer,R,70,170,0,0
var current = "numbers_row"; // div with id="numbers_row" is currently displayed
function show_or_hide(id) {
    "use strict";
    if (current) { //if something is displayed
        document.getElementById(current).style.display = "none";
        if (current === id) { //if <div> is already displayed
            current = 0;
        } else {
            document.getElementById(id).style.display = "block";
            current = id;
        }
    } else { //if nothing is displayed
        document.getElementById(id).style.display = "block";
        current = id;
    }
}

function draw_the_numbers(data) {
    "use strict";
    //Define chart boundary
    var svg = d3.select("#the_numbers")
        .append("svg")
        .attr("width", "100%")
        .attr("height", "635px");

    //Define chart type for the initial visualization
    var chartType = "Total Handedness";

    function chartUpdate(chartType) {

        var chart = new dimple.chart(svg, data);

        //Define x-axis variable and title
        var x = chart.addCategoryAxis("x", "handedness");
        x.addOrderRule(["R", "L", "B"]);
        x.title = "Handedness";
        x.fontSize = "14px";

        //Define y-axis scales and title that update when chart is updated by clicking the button
        if (chartType === "Total Handedness") {
            var y = chart.addMeasureAxis("y", "name");
            y.title = "Total";
            y.fontSize = "14px";
            var series = chart.addSeries(null, dimple.plot.bar);
            series.tooltipFontSize = "14px";
        } else if (chartType === "Average Homeruns") {
            var y = chart.addMeasureAxis("y", "HR");
            y.title = "Average Homeruns";
            y.fontSize = "14px";
            var series = chart.addSeries(null, dimple.plot.bar);
            series.aggregate = dimple.aggregateMethod.avg;
            series.tooltipFontSize = "14px";
        } else if (chartType === "Average Batting Average") {
            var y = chart.addMeasureAxis("y", "avg");
            y.title = "Average Batting Average";
            y.fontSize = "14px";
            var series = chart.addSeries(null, dimple.plot.bar);
            series.aggregate = dimple.aggregateMethod.avg;
            series.tooltipFontSize = "14px";
        }

        chart.draw(1000);
    }

    //Call chart update function for the first plot using "Total Handedness"
    chartUpdate(chartType);

    //Define options for buttons
    var stat = ["Total Handedness", "Average Homeruns", "Average Batting Average"];

    //Define buttons
    var buttons = d3.select("#numbers_buttons")
        .append("div")
        .attr("class", "nb_stat_buttons")
        .selectAll("div")
        .data(stat)
        .enter()
        .append("div")
        .text(function (d) {
            return d;
        });

    //Define button click behavior and chart update sequence by first removing the previous plot and then updating with the new plot
    buttons.on("click", function (d) {
        d3.select(".nb_stat_buttons")
            .selectAll("div")
            .transition()
            .duration(1000)
            .style("color", "black")
            .style("background", "rgb(251, 201, 127)");

        d3.select(this)
            .transition()
            .duration(1000)
            .style("background", "lightBlue")
            .style("color", "white");
        svg.selectAll("*").remove();
        chartUpdate(d);
    });
}

function draw_relationships(data) {
    "use strict";
    //Define chart boundary
    var svg = d3.select("#relationships")
        .append("svg")
        .attr("width", "100%")
        .attr("height", "635px");

    //Define chart type for the initial visualization
    var chartType = "Average Batting Average - Height";

    function chartUpdate(chartType) {

        var chart = new dimple.chart(svg, data);
        var legend = chart.addLegend(150, 40, "top");
        legend.fontSize = "14px";

        //Define x-axis and y-axis variables, scales and titles that update when chart is updated by clicking the button
        if (chartType === "Average Batting Average - Height") {
            var x = chart.addCategoryAxis("x", "height");
            x.title = "Height (inches)";
            x.fontSize = "14px";
            var y = chart.addMeasureAxis("y", "avg");
            y.title = "Batting Average";
            y.fontSize = "14px";
        } else if (chartType === "Average Batting Average - Weight") {
            var x = chart.addCategoryAxis("x", "weight");
            x.title = "Weight (pounds)";
            x.fontSize = "12px";
            var y = chart.addMeasureAxis("y", "avg");
            y.title = "Batting Average";
            y.fontSize = "12px";
        } else if (chartType === "Average Homeruns - Height") {
            var x = chart.addCategoryAxis("x", "height");
            x.title = "Height (inches)";
            x.fontSize = "14px";
            var y = chart.addMeasureAxis("y", "HR");
            y.title = "Homeruns";
            y.fontSize = "14px";
        } else if (chartType === "Average Homeruns - Weight") {
            var x = chart.addCategoryAxis("x", "weight");
            x.title = "Weight (pounds)";
            x.fontSize = "12px";
            var y = chart.addMeasureAxis("y", "HR");
            y.title = "Homeruns";
            y.fontSize = "12px";
        }

        var series = chart.addSeries("handedness", dimple.plot.line);
        series.lineMarkers = true;
        series.aggregate = dimple.aggregateMethod.avg;
        series.tooltipFontSize = "14px";

        legend._getEntries = function() {
            var orderedValues = ["R", "L","B"];
            var entries = [];
            orderedValues.forEach(function(v) {
                entries.push({
                    key : v,
                    fill : chart.getColor(v).fill,
                    stroke : chart.getColor(v).stroke,
                    opacity : chart.getColor(v).opacity,
                    series : [series],
                    aggField : [v]
                });
            }, this);
            return entries;
        };

        chart.draw(1000);
        x.shapes.selectAll("text").attr("transform", function (d) {
            if (chartType === "Average Batting Average - Weight") {
                return d3.select(this).attr("transform") + "translate(0, 10) rotate(-45)";
            } else if (chartType === "Average Homeruns - Weight") {
                return d3.select(this).attr("transform") + "translate(0, 10) rotate(-45)";
            }
        });

        // This is a critical step.  By doing this we orphan the legend. This
        // means it will not respond to graph updates.  Without this the legend
        // will redraw when the chart refreshes removing the unchecked item and
        // also dropping the events we define below.
        chart.legends = [];

        // This block simply adds the legend title. I put it into a d3 data
        // object to split it onto 2 lines.  This technique works with any
        // number of lines, it isn't dimple specific.
        svg.selectAll("title_text")
            .data(["Click legend to show/hide handedness:"])
            .enter()
            .append("text")
            .attr("x", 100)
            .attr("y", function (d, i) {
                return 30 + i * 14;
            })
            .style("font-family", "sans-serif")
            .style("font-size", "14px")
            .style("color", "Black")
            .text(function (d) {
                return d;
            });

        // Get a unique list of Owner values to use when filtering
        var filterValues = dimple.getUniqueValues(data, "handedness");
        // Get all the rectangles from our now orphaned legend
        legend.shapes.selectAll("rect")
            // Add a click event to each rectangle
            .on("click", function (e) {
                // This indicates whether the item is already visible or not
                var hide = false;
                var newFilters = [];
                // If the filters contain the clicked shape hide it
                filterValues.forEach(function (f) {
                    if (f === e.aggField.slice(-1)[0]) {
                        hide = true;
                    } else {
                        newFilters.push(f);
                    }
                });
                // Hide the shape or show it
                if (hide) {
                  d3.select(this).style("opacity", 0.2);
                } else {
                  newFilters.push(e.aggField.slice(-1)[0]);
                  d3.select(this).style("opacity", 0.8);
                }
                // Update the filters
                filterValues = newFilters;
                // Filter the data
                chart.data = dimple.filterData(data, "handedness", filterValues);
                // Passing a duration parameter makes the chart animate. Without
                // it there is no transition
                chart.draw(1000);
                x.shapes.selectAll("text").attr("transform", function (d) {
                    if (chartType === "Average Batting Average - Weight") {
                        return d3.select(this).attr("transform") + "translate(0, 10) rotate(-45)";
                    } else if (chartType === "Average Homeruns - Weight") {
                        return d3.select(this).attr("transform") + "translate(0, 10) rotate(-45)";
                    }
                });
            });
    }

    //Call chart update function for the first plot using "Homeruns - Batting Average"
    chartUpdate(chartType);

    //Define options for buttons
    var stat = ["Average Batting Average - Height", "Average Batting Average - Weight", "Average Homeruns - Height", "Average Homeruns - Weight"];

    //Define buttons
    var buttons = d3.select("#relationships_buttons")
        .append("div")
        .attr("class", "rb_stat_buttons")
        .selectAll("div")
        .data(stat)
        .enter()
        .append("div")
        .text(function (d) {
            return d;
        });

    //Define button click behavior and chart update sequence by first removing the previous plot and then updating with the new plot
    buttons.on("click", function (d) {
        d3.select(".rb_stat_buttons")
            .selectAll("div")
            .transition()
            .duration(1000)
            .style("color", "black")
            .style("background", "rgb(251, 201, 127)");

        d3.select(this)
            .transition()
            .duration(1000)
            .style("background", "lightBlue")
            .style("color", "white");
        svg.selectAll("*").remove();
        chartUpdate(d);
    });

    //Hide the rendered chart by setting style.display = "none"
    document.getElementById("relationships_row").style.display = "none";
}
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}
html {
    background: url(baseball-stadium.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
.grid {
    margin: 0 auto;
    max-width: 1500px;
    width: 100%;
}
.row {
    width: 100%;
    margin-bottom: 10px;
    display: block;
    background-color: white;
    opacity: 0.95;
}
.row::after {
    content: "";
    clear: both;
    display: table;
}
/* For mobile phones: */
[class*="col-"] {
    float: left;
    width: 100%;
}
@media only screen and (min-width: 600px) {
    /* For tablets: */
    .col-m-1 {width: 8.33%;}
    .col-m-2 {width: 16.66%;}
    .col-m-3 {width: 25%;}
    .col-m-4 {width: 33.33%;}
    .col-m-5 {width: 41.66%;}
    .col-m-6 {width: 50%;}
    .col-m-7 {width: 58.33%;}
    .col-m-8 {width: 66.66%;}
    .col-m-9 {width: 75%;}
    .col-m-10 {width: 83.33%;}
    .col-m-11 {width: 91.66%;}
    .col-m-12 {width: 100%;}
}
@media only screen and (min-width: 768px) {
    /* For desktop: */
    .col-1 {width: 8.33%;}
    .col-2 {width: 16.66%;}
    .col-3 {width: 25%;}
    .col-4 {width: 33.33%;}
    .col-5 {width: 41.66%;}
    .col-6 {width: 50%;}
    .col-7 {width: 58.33%;}
    .col-8 {width: 66.66%;}
    .col-9 {width: 75%;}
    .col-10 {width: 83.33%;}
    .col-11 {width: 91.66%;}
    .col-12 {width: 100%;}
}
h1 {
    text-align: center;
}
h3 {
    text-align: center;
}
p {
    text-align: left;
    padding-left: 25px;
    padding-right: 25px;
}
#nav_buttons {
    background-color: transparent;
}
.button {
    font-family: serif;
    font-size: 16px;
    padding: 3px;
    background-color: rgb(251, 201, 127);
    border: 2px solid rgb(33, 68, 72);
    cursor: pointer;
    text-align: center;
    width: 100%;
}
.button:active {
    color: white;
    background-color: lightblue;
}
.chart {
    display: block;
    width: 100%;
    height: 100%;
}
.nb_stat_buttons div {
    padding: 3px;
    margin-bottom: 10px;
    border: 2px solid rgb(33, 68, 72);
    background-color: rgb(251, 201, 127);
    cursor: pointer;
    text-align: center;
}
.rb_stat_buttons div {
    padding: 3px;
    margin-bottom: 10px;
    border: 2px solid rgb(33, 68, 72);
    background-color: rgb(251, 201, 127);
    cursor: pointer;
    text-align: center;
}