The gist can be viewed here
Github Repository link
Dataset contains median statistics of baseball players grouped by handedness
. Each row contains handedness
, height
,weight
,avg
, HR
and Count
. Each graph explains the difference in performance as well as body metrics based on handedness of player.
avg
and HR
weight
and height
.Dimple.js library is used create the visualization based on example "Vertical Bubble Lollipop".
Dual axis is used to plot two parameters into one chart with categorical variables on x-axis. Dual axis allows clubbing together performance on to one graph and body metrics on to another.
Tooltip animation allows explicitly read plotted data. Animation of the second graph is delayed as it has to be read after the first one.
A smoothes spline is added to each series of data as a guide to eye.
Summary of each graph is included on top of graph.
Completely revamped the visualization to explain performance based on handedness. Legends are clearer. Grouped the data based on handedness for fewer but clearer data points (used median value in each group). Used a dual axis chart to convey both performance metric with one chart. Minimum and maximum for each axis is controlled to delineate both series.
HR
and avg
side bye side rather than on top of each other.handednes
.Not able to plot bars side by side using Dimplejs, hence moved to bubble plot. Size of the bubble is maped to population used to find the median.
Two seperate graphs 1) for performance and 2) for body statistics. A smoothed line is added for each series to guide the eye. Animation is added for aesthetic loading of data.
Color coding is updated with a unique color for each series avg
,HR
,height
, weight
Running the webpage locally requires starting a webserver.
python -m http.server 8080
this will start a webserver on the port 8080.http://localhost:8080/index.html
index.html
to index_1.html
to view that version.Modified http://d3js.org/d3.v4.min.js to a secure url
Modified http://dimplejs.org/dist/dimple.v2.3.0.min.js to a secure url
https://d3js.org/d3.v4.min.js
https://dimplejs.org/dist/dimple.v2.3.0.min.js