contact_location_heatmap: Take a statcast data set and created a heatmap of hit pitch...

View source: R/contact_location_heatmap.R

contact_location_heatmapR Documentation

Take a statcast data set and created a heatmap of hit pitch locations

Description

Take a statcast data set and created a heatmap of hit pitch locations

Usage

contact_location_heatmap(
  file = NULL,
  by_pitch_type = TRUE,
  hit.status = FALSE,
  min.exit.velocity = 0
)

Arguments

file

statcast file

by_pitch_type

boolean to facet by pitch type, default is TRUE

hit.status

boolean to filter contacts into only events resulting in hits

min.exit.velocity

double to define the minimum exit velocity on a contact that you want to consider in the graphic

Value

ggplot graphic

Examples

example1 <- contact_location_heatmap(file = deGrom, by_pitch_type = TRUE, hit.status = FALSE, min.exit.velocity =0.0)
example1
example2 <- contact_location_heatmap(file = deGrom, by_pitch_type = TRUE, hit.status = TRUE, min.exit.velocity =90.0)
example2


kieran41/pitcheR documentation built on May 7, 2022, 12:07 a.m.