[R-sig-Geo] plotting Football field ball pattern data

Roger Bivand Roger.Bivand at nhh.no
Fri Jan 30 09:36:26 CET 2009

On Fri, 30 Jan 2009, srinivasa raghavan wrote:

> Hi r-sig-geo team,
> I am a new user of R 2.8.1 in windows 2003. I have a data set of football
> ball pattern data. The data is for multiple matches. The variables are :
> match: The code number of the match.
> period: First half or second half denotted by 1 or 2.
> pitchX:  The x co-ordinate of the field.
> pitchy: The y-co-ordinate of the field.
> seconds: The time point.
> I am interested to draw the football graph/diagram and then plot the above
> data.

What is a "football graph/diagram"? Is it a line joining the (x,y) in time 
sequence? Simplifying by choosing one period in one match:

o <- order(seconds)
plot(pitchX[o], pitchY[o], type="l", asp=1)

should do that, but I don't know whether this is what you need? If you 
need more detail on the trajectory, see the trip package (which is for 
animal tracking data, not dissimilar in principle).


> Can any one let me know the right functions/packages which can help me in
> this regard.
> thanks in advance.
> warm regards,
> srinivas
> statistical analyst.
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list