Plot Scaled 'ggplot' Representations of Sports Playing Surfaces


[Up] [Top]

Documentation for package ‘sportyR’ version 1.0.1

Help Pages

cani_color_league_features Check to see what features of a surface can be colored by a user
cani_plot_league Check to see if a league can be plotted, and alert the user as to which functions that league will work for
cani_plot_sport Check to see if a sport can be plotted, and alert the user as to which leagues are plottable for the sport
convert_units Function to convert all units, regardless of starting and ending units
geom_baseball Generate a ggplot2 instance containing a regulation baseball field for a specified league
geom_basketball Create a ggplot2 instance of a scale model of a basketball court
geom_football This draws a football field in its standard coordinate system, with (0, 0) being the bottom left corner of the left-most endzone. Each unit on the coordinate system corresponds to 1 yard Generate a ggplot2 instance containing a regulation football field for a specified league
geom_hockey Generate a ggplot2 instance containing an ice rink for a specified league
geom_soccer Generate a ggplot2 instance containing a soccer pitch for a specified league
reflect Perform a mathematical reflection of coordinates over a specified axis
rotate_coords Perform a mathematical rotation about (0, 0) of coordinates. This rotation is given as x' = x \* cos(theta) - y \* sin(theta) y' = x \* sin(theta) + y \* cos(theta)
translate Perform a mathematical translation of coordinates