Skip to content

Animated visualization of digital elevation data in R with satellite overlay and GPS tracklogs

Notifications You must be signed in to change notification settings

BalintKomjati/aerothlon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animated visualization of digital elevation data in R with satellite overlay and GPS tracklogs

aerothlon.mp4

Intro

Aerothlon is an alpine triathlon race of mountain running, mountain biking and paragliding. I had the pleasure to take part in the 2021 edition in Kleinarl (AT). This work visualizes the efforts of all athletes at 350x speed.

Give it a try

  1. Clone the repository into a new Rstudio project

  2. Install the following packages

  install.packages('tictoc') 
  install.packages('rayshader')
  install.packages('raster')
  install.packages('geoviz')
  install.packages('data.table')
  1. Install ffmpeg on your computer to render the video, and give R the ffmpeg’s install folder at the top of the the aerothlon.R script
ffmpeg_install_folder = "C:\\ffmpeg\\bin;"
  1. And then just source the script
source("aerothlon.R")

This will load the demo data from disk, generate the frames 1-by-1, and render the video into the working directory as ‘animation.mp4’.

The script is loaded with comments so feel free to sneak in and adjust.

Credits

This work utilizes the one-off functionalities of the awsome packages rayshader & geoviz!

To large extend this visualization was inspired by (and built on top of) the package rayshaderanimate however i decided to write a dedicated animation function on my own due to the massive changes needed in the function rayshaderanimate::video_animation_rayshade() to fit my needs.

Notes

You also need to register at https://www.mapbox.com/ for a free api key to download custom overlay images (a low quality demo overlay is included)

The script above is designed to work with a list of tracklogs however for this demo it is supplied with only one. Since it was a paragliding competition the logs are in igc format. The script should work well with gpx files also. I preformatted the igc_demo file e.g. adjusted the elevation not to cross the ground and reduced its resolution.

About

Animated visualization of digital elevation data in R with satellite overlay and GPS tracklogs

Resources

Stars

Watchers

Forks

Languages