sportyR2.2.2 package

Plot Scaled 'ggplot' Representations of Sports Playing Surfaces

hockey_penalty_box_outline

The penalty boxes are the areas outside the confines of the rink where...

hockey_player_bench_area_fill

The player benches are the areas outside the confines of the rink wher...

hockey_player_bench_outline

The player benches are the areas outside the confines of the rink wher...

hockey_referee_crease

The referee's crease is a semi-circle on the "bottom" of the boards (i...

hockey_zone_line

The zone lines are the lines that separate the neutral zone from the o...

is_hex

Identify if a passed color is a hexadecimal string

lacrosse_below_goal_marking

On some fields, there is a below goal marking. These are circles that ...

lacrosse_boards

The boards are the wall around the outside of the field that constrain...

lacrosse_center_circle

The center circle is where play begins to start a game. This is locate...

lacrosse_center_line

The center line divides the field of play into two equal halves, which...

lacrosse_change_area_fill

The change area is the box-shaped area in front of the team benches wh...

lacrosse_change_area_outline

The change area is the box-shaped area in front of the team benches wh...

lacrosse_defensive_area_line

The defensive-area lines run parallel to the sidelines and are connect...

lacrosse_defensive_zone

The defensive zone is the TV-left area of the playing surface. In many...

lacrosse_end_line

The end lines run the width of the field, with its interior edge desig...

lacrosse_face_off_marker

The face-off markers are where face-offs occur. They may take one of t...

lacrosse_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

lacrosse_field_apron

Outdoor require should have a field apron so that boundary lines are m...

lacrosse_goal_arc

The arc around the goal circle is a semi-circular area located around ...

baseball_base

One of the bases on the diamond, or really any base on the field. Thes...

baseball_batters_box

The batter's boxes on the field. This is where a batter must stand to ...

baseball_catchers_box

The catcher's box. This is where the catcher is located on defense, us...

baseball_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

baseball_foul_line

The foul line. These are the white lines that extend from the back tip...

baseball_home_plate

Home plate. This is a pentagonal shape with its back tip located at th...

baseball_infield_dirt

The dirt that comprises the infield. This includes the base paths, inf...

baseball_infield_grass

The dirt that comprises the infield grass. This is the area inside the...

baseball_pitchers_mound

The pitcher's mound. This is where the pitcher's plate is located, but...

baseball_pitchers_plate

The pitcher's plate. This is where the pitcher must throw the ball fro...

baseball_running_lane

The running lane is entirely in foul territory. The depth should be me...

basketball_backboard

The backboard is the backing onto which the basket ring (created by `b...

basketball_basket_ring

The hoop through which the ball must pass to score points for a team i...

basketball_center_circle_fill

The center circle is broken into two parts: the `basketball_center_cir...

basketball_center_circle_outline

The center circle is broken into two parts: the outline (this feature)...

basketball_court_apron

The apron of the court is the colored boundary around the exterior of ...

basketball_division_line

The division line divides the court into two halves, and is sometimes ...

basketball_endline

The endline on a basketball court, also called the baseline, is locate...

basketball_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

basketball_free_throw_circle

The outline of the free throw circle. The interior filling area is cre...

basketball_free_throw_circle_dash

On some courts, there are a series of dashes that comprise the bottom ...

basketball_free_throw_circle_fill

The filled-in section of the free throw circle. The circle is the area...

basketball_free_throw_lane_boundary

The lines providing the boundary to the free throw lane. When a player...

basketball_half_court

Each half court spans from the inner edge of the baseline to the cente...

basketball_inbounding_line

The inbounding line is where the ball is inbounded on the sideline whe...

basketball_lane_space_mark

The lane space marks, also known as the blocks, denote where non-shoot...

basketball_lower_defensive_box_mark

The lower defensive box is an imaginary box on the court extending fro...

basketball_net

To make the basket ring easier to identify, the nets will also be draw...

basketball_painted_area

The painted area is the area contained by the free throw lane (see `ba...

basketball_restricted_arc

The arc located in the free-throw lane is called the restricted arc. T...

basketball_sideline

The sideline on a basketball court run the full length of the court, t...

basketball_substitution_line

The substitution line is where players checking into the game wait for...

basketball_team_bench_line

Players not in the game must stay within the team bench lines unless m...

basketball_three_point_line

An arc on the court, behind which any made basket counts as three poin...

basketball_two_point_range

If a court has a three-point line (see basketball_three_point_line()...

cani_color_league_features

Check to see what features of a surface can be colored

cani_plot_league

Check to see if a league can be plotted, and alert as to which functio...

cani_plot_sport

Check to see if a sport can be plotted, and alert as to which league(s...

convert_units

Convert all units, regardless of starting and ending units

curling_back_line

The back line is the line in the back of the house. Its outer edge sho...

curling_button

The inner-most of the concentric circles comprising the house is calle...

curling_centre_line

The centre line is the line that runs the full length of the curling s...

curling_centre_zone

The curling sheet is the entire sheet, with the houses at either the t...

curling_courtesy_line

The courtesy lines are where players stand during the delivery process...

curling_end

The curling sheet is the entire sheet, with the houses at either the t...

curling_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

curling_hack_foothold

The hack exits on both sides of the curling sheet between the back boa...

curling_hack_line

The hack line connects the two footholds at each hack. It should be an...

curling_hog_line

The hog line is the line that begins the Free Guard Zone at each end o...

curling_house_ring

The house is comprised of three concentric circles outside of the butt...

curling_sheet_apron

The apron of the sheet is what separates adjacent sheets, and in this ...

curling_tee_line

The tee line is the line that runs through the center of the house. It...

football_coaching_box

The coaching box is the area between the restricted area and team benc...

football_coaching_box_line

The coaching box line is the line that separates the team bench area f...

football_directional_arrow

The directional arrows point towards the nearest goal line from the ya...

football_end_line

The end line is the line beyond the back of the endzone. Its interior ...

football_endzone

The endzones are the area beyond the goal line. Any offensive player w...

football_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

football_field_apron

The field should have an apron to appropriately see all out-of-bounds ...

football_field_border

The field border is the border line around the outer edge of the sidel...

football_field_border_outline

The field border's outline is the outline around the outer edge of the...

football_goal_line

The goal lines are the lines the ball must cross while being either pa...

football_half_field

Each half of the football field spans from the edge of the goal line n...

football_major_yard_line

The major yard lines are the yard lines that span the entire width of ...

football_minor_yard_line

The minor yard lines are the yard lines in between all of the major ya...

football_red_zone_border

The field border (see football_field_border()) may have a different ...

football_red_zone_border_outline

The outline of the football_red_zone_border() may be a different col...

football_restricted_area

The restricted area is the area nearest the sideline's exterior edge. ...

football_sideline

The sidelines are the lines that run the length of the field, stretchi...

football_team_bench_area

The team bench area is the area beyond the restricted area and coachin...

football_team_bench_area_outline

The outline of the team bench area runs beyond the team bench, but is ...

football_try_mark

The try mark is the mark from which all tries start. This line is loca...

geom_baseball

Generate a ggplot2 instance containing a baseball field for a specif...

geom_basketball

Generate a ggplot2 instance containing a basketball court for a spec...

geom_curling

Generate a ggplot2 instance containing a curling sheet for a specifi...

geom_football

Generate a ggplot2 instance containing a football field for a specif...

geom_hockey

Generate a ggplot2 instance containing an ice rink for a specified l...

geom_lacrosse

Generate a ggplot2 instance containing a lacrosse field for a specif...

geom_soccer

Generate a ggplot2 instance containing a soccer pitch for a specifie...

geom_tennis

Generate a ggplot2 instance containing a tennis court for a specifie...

geom_volleyball

Generate a ggplot2 instance containing a volleyball court for a spec...

grapes-or-grapes

Set the default value when not provided in a list

hockey_boards

The boards are the wall around the outside of the rink that constrain ...

hockey_center_faceoff_circle

The center faceoff circle is where the each period of the game begins....

hockey_center_faceoff_spot

The center faceoff spot is the spot at which the game begins. Its cent...

hockey_center_line

The center line is the line that divides the ice surface in half. Its ...

hockey_defensive_zone

The defensive zone is the left "third" of the rink in TV view. This is...

hockey_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

hockey_goal_crease_fill

The goal crease is the area where a goaltender plays their position. I...

hockey_goal_crease_outline

The goal crease is the area where a goaltender plays their position. I...

hockey_goal_frame

The goal frame is where the puck enters after crossing the goal line t...

hockey_goal_frame_fill

The goal frame is where the puck enters after crossing the goal line t...

hockey_goal_line

The goal lines are the lines over which a puck must cross (within the ...

hockey_goaltenders_restricted_area

The goaltender's restricted area marks where a goaltender is legally a...

hockey_neutral_zone

The neutral zone is the middle "third" of the rink. This is the area b...

hockey_nodzone_faceoff_spot_ring

The non-centered faceoff spots are located in the neutral, offensive a...

hockey_nodzone_faceoff_spot_stripe

The non-centered faceoff spots are located in the neutral, offensive a...

hockey_odzone_faceoff_circle

The non-centered faceoff circles are located in the offensive and defe...

hockey_odzone_faceoff_lines

The offensive/defensive zone faceoff lines are the L-shaped lines wher...

hockey_off_ice_officials_box

The off-ice officials' box is located between the two penalty boxes, o...

lacrosse_goal_circle

The goal circle is a circular feature on the field that houses the goa...

lacrosse_goal_circle_fill

This feature is the area enclosed by the goal circle's outline. Please...

lacrosse_goal_fan

The goal arc fan is present on some fields (e.g. NCAAW) as a quarter-c...

lacrosse_goal_fan_hash_mark

The hash marks around the goal fan (see lacrosse_goal_fan()) are dra...

lacrosse_goal_frame

The goal frame is the posts through which the ball must pass in order ...

lacrosse_goal_line

The goal line is where the front edge of the goal sits. It spans the e...

lacrosse_goal_mouth

The goal mouth is similar to the goal fan, except it is plainly a semi...

lacrosse_goal_mouth_hash_mark

The goal mouth may have a hash mark that extends towards midfield from...

lacrosse_goal_net

The goal net is the netting that the ball must hit in order to score a...

lacrosse_neutral_zone

The neutral zone corresponds to the area between the restraining lines...

lacrosse_off_field_officials_box

The off-field officials' box is located between the two penalty boxes,...

lacrosse_offensive_zone

The offensive zone is where a team tries to score a goal. It is the TV...

lacrosse_penalty_box_fill

The penalty boxes are the areas outside the confines of the field wher...

lacrosse_penalty_box_outline

The penalty boxes are the areas outside the confines of the field wher...

lacrosse_player_bench_area_fill

The player benches are the areas outside the confines of the field whe...

lacrosse_player_bench_outline

The player benches are the areas outside the confines of the field whe...

lacrosse_referee_crease

The referee's crease is a semi-circle on the "bottom" of the boards (i...

lacrosse_referee_crease_fill

The referee's crease is a semi-circle on the "bottom" of the boards (i...

lacrosse_restraining_line

The restraining line spans the entire width of the field (where presen...

lacrosse_sideline

The sidelines run the length of the field, with its interior edge desi...

lacrosse_wing_line

The wing lines run parallel to the sidelines and cross the center line

load_default_parameters

Load default parameters for a specified league. This should only be us...

reflect

Perform a mathematical reflection of coordinates over a specified axis

rotate_coords

Perform a mathematical rotation about (0, 0) of coordinates. This rota...

soccer_center_circle

The center circle is the circle located at the center of the field. In...

soccer_center_mark

The center mark is where kickoffs for each half, as well as following ...

soccer_corner_arc

The corner arcs are the quarter-circles located where the touchline me...

soccer_corner_defensive_marks

The corner defensive marks on the pitch are typically located 9.15 met...

soccer_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

soccer_goal

The goal is located beyond each goal line. By rule, the goal posts mus...

soccer_goal_box

The goal box is the smaller of the two boxes that extend from the goal...

soccer_goal_line

The goal line is the line that runs the full width of the pitch. The b...

soccer_half_pitch

Half of the pitch is located on each side of the halfway line (see `so...

soccer_halfway_line

The halfway line, aka the midfield line or center line, runs the width...

soccer_penalty_box

The penalty box on the pitch is the larger of the two boxes that exten...

soccer_penalty_mark

The penalty mark is the center point for the arc of the penalty box, a...

soccer_pitch_apron

The pitch should have an apron around it to do two things:

soccer_touchline

The lines that run the full length of the pitch are called the touchli...

surface_dimensions

surface_dimensions

tennis_backcourt

The backcourt is the area behind the serviceline on the court, contain...

tennis_baseline

The baseline is the line behind which a player will serve the ball. It...

tennis_center_mark

The center mark identifies the center point of the tennis_baseline()...

tennis_center_serviceline

The center serviceline on the court divides the service area into two ...

tennis_court_apron

The court apron is referred to as the backstop and sidestop. These are...

tennis_doubles_alley

The doubles alley is the area between the singles and doubles sideline...

tennis_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

tennis_frontcourt_half

The front court is the area between the tennis_net() and the `tennis...

tennis_net

The net divides the court into two halves, and should run through the ...

tennis_serviceline

The serviceline is the line in front of which (nearest the net) a serv...

tennis_sideline

The sideline runs the entire length of the court, and there may be up ...

volleyball_attack_line

The attack line runs from sideline to sideline separating the court's ...

volleyball_backcourt

The backcourt is the area between the the attack line (see `volleyball...

volleyball_center_line

The center line's axis runs along x = 0 when viewing the court in TV...

volleyball_court_apron

The court apron is similar to the basketball_court_apron() in that i...

volleyball_end_line

The lines on the court that run the full width of the court are referr...

volleyball_features_set_colors

Set the colors to be used for the plot. The values provided in the arg...

volleyball_free_zone

The free zone is similar to the basketball_court_apron() in that it ...

volleyball_front_zone

The front zone is the area between the attack line (see `volleyball_at...

volleyball_service_zone_mark

The service zone marks are the lines beyond the end lines that denote ...

volleyball_sideline

The lines on the court that run the full length of the court are refer...

volleyball_substitution_zone_dash

The substitution zone is typically marked by a dashed line extending f...

hockey_offensive_zone

The offensive zone is the right "third" of the rink in TV view. This i...

hockey_penalty_box_fill

The penalty boxes are the areas outside the confines of the rink where...

Create scaled 'ggplot' representations of playing surfaces. Playing surfaces are drawn pursuant to rule-book specifications. This package should be used as a baseline plot for displaying any type of tracking data.

  • Maintainer: Ross Drucker
  • License: GPL (>= 3)
  • Last published: 2024-02-15