We wanted to create a subset of the data to be analyzed. Then we needed to manipulate the data and add a desired launch angle as well as eliminate the bearings outside of \(50\) degrees on either side. So basically, the data was first filtered by balls in play that are at least a distance of \(200\) while having an angle of at least \(15\) and making sure the bearings are outside of \(50\) on either side. Lastly, we needed to filter the data for outs.
This spraychart shows the where all the balls in play were based on the filtering for everything except outs. This helped get a visual of where all balls in play are since each playresult.
The first of these two density plots shows us distribution of the playresults based on the balls in play. The second density plot shows us were the distribution of the outs balls were.
This 2-D density plot shows helps us get a visual of where to place place players based on where the outs are.
Now we take a look at the platoon splits for both pitcher and batter using the same data we filtered earlier for outs.
If we look at the three peaks for each of the density plots we can get an idea of where to place players based on the specific platoon split.
Now with the 2-D density plots of the platoon splits we can get a closer look at where to place players.
FALSE [1] -132.236
FALSE [1] 257.0304
FALSE [1] -1.080004
FALSE [1] 309.5608
FALSE [1] 131.3427
FALSE [1] 253.1959
FALSE pos dis
FALSE 1 -132.235960 257.0304
FALSE 2 -1.080004 309.5608
FALSE 3 131.342729 253.1959
FALSE [1] -130.1944
FALSE [1] 247.6901
FALSE [1] -9.517683
FALSE [1] 310.5929
FALSE [1] 126.0581
FALSE [1] 265.3121
FALSE pos dis
FALSE 1 -130.194407 247.6901
FALSE 2 -9.517683 310.5929
FALSE 3 126.058058 265.3121
FALSE [1] -130.4288
FALSE [1] 267.112
FALSE [1] 2.081733
FALSE [1] 308.6062
FALSE [1] 130.4864
FALSE [1] 248.1967
FALSE pos dis
FALSE 1 -130.428766 267.1120
FALSE 2 2.081733 308.6062
FALSE 3 130.486407 248.1967
FALSE [1] -132.9722
FALSE [1] 247.4793
FALSE [1] -7.699968
FALSE [1] 311.2972
FALSE [1] 133.5792
FALSE [1] 267.1885
FALSE pos dis
FALSE 1 -132.972221 247.4793
FALSE 2 -7.699968 311.2972
FALSE 3 133.579197 267.1885
FALSE [1] -132.9184
FALSE [1] 265.2074
FALSE [1] 3.049083
FALSE [1] 308.754
FALSE [1] 131.5076
FALSE [1] 249.0366
FALSE pos dis
FALSE 1 -132.918369 265.2074
FALSE 2 3.049083 308.7540
FALSE 3 131.507636 249.0366
Here we first look at where to place players in general not using the platoon split. Then we do look at the platoon split. The order of the data is LeftLeft, LeftRight, RightLeft, and RightRight. We do this by dividing up the field into three sections one for left field, center field, and right field. Then we find the mean of the x and y coordinates to get an average to figure out where to place the players.
Then we decide to only look at the platoon splits for batting as we found the the pitcher to be negligent.
Here we create 2-D density plots to help get a visual of where to place the players as the more dense regions tell us that a player should be placed here.
FALSE plt pos dis
FALSE 1 RB -132.112836 265.8149
FALSE 2 RB 2.751103 308.7208
FALSE 3 RB 131.162426 248.7409
FALSE plt pos dis
FALSE 1 LB -132.34996 247.5666
FALSE 2 LB -8.09627 311.1437
FALSE 3 LB 131.84851 266.7567
Once again we divide up the field into three sections one for left field, center field, and right field. We look where to place the player based on the platoon split of the batters.
FALSE plt pos dis
FALSE 1 RB -132.112836 265.8149
FALSE 2 RB 2.751103 308.7208
FALSE 3 RB 131.162426 248.7409
FALSE 4 LB -132.349959 247.5666
FALSE 5 LB -8.096270 311.1437
FALSE 6 LB 131.848514 266.7567
This spraychart shows us were to place all the players based on the platoon splits for batting for left field, center field, and right field.
Now with all the data we have we can determine how the player needs to walk to get to the position if they start on second base. If the platoon split is for a right handed batter then the player will need to turn right and vice versa for a left handed batter. The order is right handed batter then left handed batter.