Description Usage Arguments Details Value Note Author(s)
Finds the most similar players to a given player in a dataset based upon offensive peripheral data
1 | similarityToolOff(battedBallVals, playerName, numResults = 10, year=2017)
|
battedBallVals |
A dataframe of offensive peripheral data from FanGraphs. |
playerName |
A string with the name of a player in the format "Firstname Lastname" |
numResults |
An integer. Defaults to 10. |
year |
An integer. Defaults to 2017. |
BattedBallVals are designed to be from FanGraphs, using the Batted Ball tab in conjunction with BB% and K%. To generate an appropriate dataset, use the "Custom Report" feature from FanGraphs. Each dataset must contain all of the following attributes (other values can be included, but will not be used): GB%, LD%, FB%, HR/FB, Pull%, Cent%, Oppo%, Soft%, Med%, Hard%, K%, BB% Name. The player name must be exactly formatted as it appears in FanGraphs.
A dataframe with the players most similar to playerName and their similarity scores.
Similarity scores will differ depending upon the sample size presented due to the normalization applied in the creation of the scores.
John Edwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.