Outline
- Motivation
- Functionality of trackeR
- Code examples and implementation detail
Questions to answer in the next 15 minutes:
- Why care?
- What can you do with trackeR?
- How does it work?
8 September 2016
Outline
Questions to answer in the next 15 minutes:
library("trackeR") filepath <- system.file("extdata", "2013-06-08-090442.TCX", package = "trackeR") runDF <- readTCX(file = filepath, timezone = "GMT") str(runDF)
## 'data.frame': 1191 obs. of 9 variables: ## $ time : POSIXct, format: "2013-06-08 08:04:42" ... ## $ latitude : num 51.4 51.4 51.4 51.4 51.4 ... ## $ longitude : num 1.04 1.04 1.04 1.04 1.04 ... ## $ altitude : num 6.2 6.2 6.2 6.2 6.2 ... ## $ distance : num 0 1.68 5.28 8.33 14.88 ... ## $ heart.rate: num 83 84 84 86 89 93 96 98 101 102 ... ## $ speed : num 0 0.594 1.416 1.928 2.614 ... ## $ cadence : num NA 54 74 97 97 97 97 98 97 97 ... ## $ power : num NA NA NA NA NA NA NA NA NA NA ...
runTr0 <- trackeRdata(runDF) runTr1 <- readContainer(filepath, type = "tcx", timezone = "GMT") identical(runTr0, runTr1)
## [1] TRUE
runTr2 <- readDirectory(system.file("extdata", package = "trackeR"), timezone = "GMT")
## Reading file /home/frick/lib/R/trackeR/extdata/2013-06-08-090442.TCX (file 1 out of 1) ... ## Cleaning up...Done
identical(runTr0, runTr2)
## [1] TRUE
data("runs", package = "trackeR")
plot(runs, session = c(3,13)) plotRoute(runs, session = 1:4, source = "osm") leafletRoute(runs, session = c(3,6,7,10,12,13,21))