mmlak-0109
4/26/2017 - 1:01 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. #html

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

var current_button = "handedness";
function disable_button(id) {
    "use strict";
    document.getElementById(current_button).disabled = false;
    document.getElementById(current_button).style.cursor = "pointer";
    document.getElementById(id).disabled = true;
    document.getElementById(id).style.cursor = "not-allowed";
    current_button = id;
}

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

    //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(["Right", "Left", "Both"]);
        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("Handedness", dimple.plot.bar);
            series.tooltipFontSize = "14px";
        } else if (chartType === "Average Home Runs") {
            var y = chart.addMeasureAxis("y", "Home Runs");
            y.title = "Average Home Runs";
            y.fontSize = "14px";
            var series = chart.addSeries("Handedness", dimple.plot.bar);
            series.aggregate = dimple.aggregateMethod.avg;
            series.tooltipFontSize = "14px";
        } else if (chartType === "Average Batting Average") {
            var y = chart.addMeasureAxis("y", "Average");
            y.title = "Average Batting Average";
            y.fontSize = "14px";
            var series = chart.addSeries("Handedness", dimple.plot.bar);
            series.aggregate = dimple.aggregateMethod.avg;
            series.tooltipFontSize = "14px";
        }

        chart.draw(1000);
    }

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

    //Define buttons
    var buttons = d3.select("#numbers_buttons")
        .selectAll("div")
        .data(stat)
        .enter()
        .append("button")
        .attr("class", "button")
        .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("#numbers_buttons")
            .selectAll("button")
            .transition()
            .duration(1000)
            .attr("disabled", null)
            .style("cursor", "pointer");

        d3.select(this)
            .transition()
            .duration(1000)
            .attr("disabled", "true")
            .style("cursor", "not-allowed");
        svg.selectAll("*").remove();
        chartUpdate(d);
    });

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

    //Disable "Total Handedness" button
    d3.select("#numbers_buttons")
        .select("button")
        .attr("disabled", "true")
        .style("cursor", "not-allowed");
}

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

    //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", "Average");
            y.title = "Average 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", "Average");
            y.title = "Average Batting Average";
            y.fontSize = "12px";
        } else if (chartType === "Average Home Runs - Height") {
            var x = chart.addCategoryAxis("x", "Height");
            x.title = "Height (inches)";
            x.fontSize = "14px";
            var y = chart.addMeasureAxis("y", "Home Runs");
            y.title = "Average Home Runs";
            y.fontSize = "14px";
        } else if (chartType === "Average Home Runs - Weight") {
            var x = chart.addCategoryAxis("x", "Weight");
            x.title = "Weight (pounds)";
            x.fontSize = "12px";
            var y = chart.addMeasureAxis("y", "Home Runs");
            y.title = "Average Home Runs";
            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 = ["Right", "Left", "Both"];
            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 Home Runs - 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 Home Runs - Weight") {
                        return d3.select(this).attr("transform") + "translate(0, 10) rotate(-45)";
                    }
                });
            });
    }

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

    //Define buttons
    var buttons = d3.select("#relationships_buttons")
        .selectAll("div")
        .data(stat)
        .enter()
        .append("button")
        .attr("class", "button")
        .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("#relationships_buttons")
            .selectAll("button")
            .transition()
            .duration(1000)
            .attr("disabled", null)
            .style("cursor", "pointer");

        d3.select(this)
            .transition()
            .duration(1000)
            .attr("disabled", "true")
            .style("cursor", "not-allowed");
        svg.selectAll("*").remove();
        chartUpdate(d);
    });

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

    //Disable "Homeruns - Batting Average" button
    d3.select("#relationships_buttons")
        .select("button")
        .attr("disabled", "true")
        .style("cursor", "not-allowed");

    //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: inline-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;
    cursor: pointer;
    text-align: center;
    width: 100%;
}
#handedness {
    cursor: not-allowed;
}
.chart {
    display: inline-block;
    width: 100%;
}
rect {
    cursor: pointer;
}

Make Effective Data Visualization: Baseball

Summary

The data-set for these visualizations contains 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.

Design

I began my exploration of the data initially in a spreadsheet, but I made my initial plots using dimple. I began by making one or two scatter plots and bar graphs, but I pretty quickly went ahead and made all the plots I could think of. After getting all of the charts made individually, I decided I wanted to break the data into two different sections, highlighting different relationships in each section. From this point on, however, I focused mainly on the technical side of my visualizations, putting off making my graphs explanatory until later. It was at this point in the development of my visualizations that I asked for feedback from three people. I adjusted my plots to incorporate almost all of the points of improvement brought up in the feedback, and then, thanks to a reminder to make sure my visualizations tell a story, I refocused my plots and found some key points to highlight.

In the "Average Performance Stats by Handedness" set of plots, I chose bar graphs due to the variables being categorical. For the "Average Performance Stats by Height/Weight" section, I chose line graphs so that any trends between the performance stats and height and weight could be seen. I also chose to make the legend interactive to allow viewers to untangle the data by isolating each line. In addition, while the colors used for the line graphs are dimple's default colors, I chose keep them after playing around with other sets of colors. I thought that, compared to the other color combinations I tried, they provided the best contrast and had a nice soft tone that is distinct yet easy on the eyes. Finally, my main reason for showing only one set at a time, and one chart within each set at a time, was to keep the visualization page as clean and simple as possible.

Feedback

Feedback #1

The first person to provide me feedback was Myles (an always very helpful forum mentor). He replied to my post asking for feedback in the forums. He gave me three suggestions for improving me my visualization.

  1. He pointed out tome that on some browsers my background isn't full screen, and he provided a picture showing me proof. He then provided me a link to a website that had a tutorial on CSS code that would help to resolve the issue. The link proved to be very helpful, and I was able to fix the problem.

  2. Next he suggested, "Instead of displaying both charts at the start, I think that having a single chart throughout the visualization would look better." I agreed and replied, in part, "Regarding point number two, I completely agree. That is my end goal, but I haven't been able to find a way to do it." After some troubleshooting, however, I was able to eventually solve the problem. I wrote back to Myles explaining how I did it.

This was my response:

I had tried to hide the "Data Relationships" set of charts when the page first loads by setting the CSS "display" property for it to "none", but that would cause the chart to display improperly after I clicked on the "Data Relationships" button to make it show up. The chart would be completely compressed up in the top left corner of the "div". I didn't know what caused this problem, but I found the answer through this post. Because the div's display is set to none, it seems that the chart only has a 0px space within which to render the chart. Since clicking on the "Data Relationships" button doesn't redraw the chart but simply makes the previously hidden div display, only the compressed chart will show up.

At this point, the first idea that came to mind was to alter the function for my buttons so that it would make a call to the charts draw function on each click, but that seemed like a confusing route to take. So after thinking about it a bit more, I thought that simply adding the line document.getElementById ("relationships_row").style.display = "none"; at the end of the charts draw function might solve the problem because this would set the display property to none only after the chart had been drawn. Turns out I was right. That one simple line of code was all I needed.

  1. His final response was about dimple's default colors stating, "This is personal preference, but I don't think that dimple's default colors have enough contrast. You can easily change them." He then provided me with two links. One showed how to assign colors myself, and the other one showed how to change dimple's default color's.

Later on, while helping me debug the code for my interactive legend, he gave my one last bit of advice as feedback. He said, "One thing that you will have to think about before you submit is the story that your visualization is telling. Your visualization will breeze through the technical part of the review process. However, an important part of the process is that your visualization tells a story. (The most commonly used phrase is that visualizations should be 'Explanatory, not Exploratory'). Given the breadth of your visualization, you will have to add some text to your visualization that gives a clear message that your visualization has a central theme/story." It was at this point that I realized I had almost completely ignored this aspect of my visualizations. As a result, I refocused my plots to make sure I had clear findings to present.

Feedback #2

The second person to provide me feedback was Joey, who is a LinkedIn connection and recent graduate of Udaity's Data Analyst Nanodegree Program. Here is what he pointed out to me as fixes.

  1. After a quick initial look-though he said, "I found a bug that the buttons on right side of the "Data Relationships" page keep being highlighted when I clicked on another other one." I told him that I had noticed that as well, but that I hadn't been able to find the problem yet. He actually found the bug in my code for me and suggested a fix that might work. His suggested fix didn't quite work, but thanks to his suggestion I was able to find the right fix and solve the problem.

  2. He took the time to have a more thorough look-through later on, and he responded with this:

With Matt's visualized data, I easily got the following information.

With data breakdown page

  • I got that the majority of players are right handed.
  • Left handed players had the most home runs, and right handed players had the least.
  • Left handed and both handed players have a better batting average than right handed players.
  • There is almost no differences among the players in height and weight.

With relationships

  • The players with low batting averages had less home runs. But, there is no relationship when batting average is greater than 0.25
  • Height-batting average and weight-batting show that the batting rate between 0.2 to 0.3 is majority.
  • The distributions of Height-homerun and weight-homerun are like a normal distribution, which makes sense that both height and weight have weak relationships with home runs.

For the design, I like the background that matches the topic of data. It is not a complicated picture, so my view is not interrupted by it. The introduction at top gives me the basic information of the data, and it's located at a good position so that I can easily review the data with the basic information. Also, the colors are well selected. I feel comfortable when I am observing the data.

The following are points can be improved

  • The dash line is not clear because the dots are so crowded. Adding the background color to the dash line may be better.
  • The loading of the relationship page is a little bit slow.
  • The numbers on the x axis for weight are too close together on the weight-homerun plot.

Feedback #3

The final person to give me feedback was my wife. Because the first two people have taken the same course as me, they are familiar with the dataset I am using and the visualization techniques being implemented. As a result, I felt like getting feedback from someone who is unfamiliar with these things would be beneficial, allowing me to get feedback from a much different perspective than the first two people. The feedback that she gave me centered more on problems she saw in the display of the visualization.

  1. The main points she gave were these:
    • Changing the color of the bars in the bar graph would make it easier to identify the handedness.
    • The pop-up info box (tool-tip) is a little small. It was a bit hard to read the information.
    • The chart labels are a little small. Also, adding the units of measurement into the labels would make the charts easier to understand.
    • The colors for the bubbles don’t have enough contrast (mainly between the red and yellowish/orange color used for Right handedness and Both handedness.
    • The numbers for weight on the x-axis should be angled for easy reading.
    • If possible, finding a way to make the data points less crowded in the bubble graphs would make things easier to understand.
    • For the “Height-Weight” graph, switching the x and y axis made the graph easier to understand.

Reviewer Feedback

After submitting my project for an official review, I received the following feedback on some final changes I needed to make to my visualization:

  • Colour coding - L,R and B are all blue in the bar charts and three different colours in the lines. Could you keep this consistent for both. You're right, you don't need a legend for the bar chart as the bar labels do this for you but you can still apply the colour coding.
  • Buttons - colour - along the same note, you've used the same colour scheme (blue and orange) for the buttons which is double/triple encoding. Greyscale often works well for buttons, particularly in your case with the bright background photo.
  • Buttons - disabled/enabled - please make sure it is clear to the reader which chart is selected at all times. "Average Performance Stats by Handedness" and "Total Handedness" should be disabled/selected by default. This would also resolve the rendering error above.
  • L, R, B - "left", "right", "both" would be so much more accessible?
  • Tooltips - along the same lines as above "Average" is so much better than "avg".
  • Alignment - it would be great if you could move the chart to the left a little and the findings/buttons to the right. At the moment there is too much space on the left and too little on the right.

The final draft of my visualization has been changed to reflect all of these suggested changes.

Citations