similarityToolOff: Offensive Similarity Tool

Description Usage Arguments Details Value Note Author(s)

Description

Finds the most similar players to a given player in a dataset based upon offensive peripheral data

Usage

1
similarityToolOff(battedBallVals, playerName, numResults = 10, year=2017)

Arguments

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.

Details

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.

Value

A dataframe with the players most similar to playerName and their similarity scores.

Note

Similarity scores will differ depending upon the sample size presented due to the normalization applied in the creation of the scores.

Author(s)

John Edwards


Metlover/similarityTool documentation built on May 22, 2019, 1:03 p.m.