JoGall / soccermatics

Tools for visualisation and analysis of soccer tracking and event data
308 stars 36 forks source link

Include swapSides argument to match attacking direction in both periods #7

Closed JoGall closed 6 years ago

JoGall commented 6 years ago

Requested by email:

Include boolean argument swapSides in functions; if TRUE, adjust x,y-coordinates from 2nd period to match attacking direction in 1st period.

e.g.

new.x = pitchLength - x
new.y = pitchWidth - y
JoGall commented 6 years ago

Added soccerFlipHoriz.R() function to flip x,-y-coordinates of both sides in one half.