Run the app:
- Via the R console:
shiny::runGitHub(repo ="garmin-football", username = "pawleymatthew")
- In web browser: https://pawleymatthew.shinyapps.io/garmin-football/
- Start a Garmin activity with "Auto Lap = Manual Only" and "Lap Key = On"
- Press the Lap button to create breakpoints in the match, for example i) at the start and end of a long break in play, e.g. due to an injury; ii) at the start and end of the half time break.
- Press 'Stop' and 'Save' at full time.
- Find the relevant activity on Garmin Connect or Strava, and click
Export Original
. - If required, extract the the
.fit
file from the.zip
file. - Upload the
.fit
file. - Set the pitch boundaries by placing the markers at the corners, toggling between the OpenStreetView and Satellite map views if necessary. The marker labels indicate the positions ("RB" = right back, "RF" = right forward etc.) with respect to the 1st half direction of attack.
- Select which half (1st/2nd) each lap was part of. Laps that you don't want to contribute to the heatmap (e.g. a break in injury) should be left unchecked. The only effect of designating halves is that 2nd half laps will be flipped. If you did not swap ends at half time, then designate all laps as 1st half.
- Enter the number of goals scored (if you want this to appear in the plot subtitle).
- Write a title for the plot. Choose what information you want the subtitle to contain.
- Click
Generate heatmap
to make the graphic. Thereafter, the graphic will update automatically when inputs are updated. - Click
Download
to save the plot as a PNG file.
An example file is provided in the data
folder.
football-2023-12-10.fit
- Match info: https://fulltime.thefa.com/displayFixture.html?id=25855067
- First half = laps 1 and 3.
- Second half = lap 5 (cut short, accidentally paused watch midway through!).
- Laps 2 (break in play due to injury) and 4 (half time) should be excluded.
- Player is a left-winger attacking south-eastward in the first half.
- Summary stats (distance, time, speed, no. sprints) for each half.
- Some CSS to make it look a bit nicer.