View source: R/contact_location_heatmap.R
contact_location_heatmap | R Documentation |
Take a statcast data set and created a heatmap of hit pitch locations
contact_location_heatmap( file = NULL, by_pitch_type = TRUE, hit.status = FALSE, min.exit.velocity = 0 )
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 |
ggplot graphic
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.