flowchart LR
A1[Look for Code] --> A2[Install from CRAN] --> A3[Reshape Data] --> A4[Run Model] --> A5[Reshape Results] --> A6[Interpret]
Bridging the usability gap in open source
animal movement algorithms
whoamiI help scientists with their data analysis at Max Planck Institute of Animal Behavior.
travelpaths package provides a consistent interface that simplifies the process of running multiple methods on an animal movement dataset.
Researchers who collect movement data using both traditional and automated methods.
Typically R users with a passion for science not for coding. Much of the analysis is carried out by early career researchers.
Photos copyright Max Planck Institute of Animal Behavior and Christian Zeigler
Animal Movement Data typically consists of x, y, time, and individual id.
Movement Classification is a diverse group of methodologies that break a longer movement path into distinct sections, and optionally group those section.
This step is performed to understand a variety of biologically significant characteristics including but not limited to
Lots of peer-reviewed methods to classify an animal path into segments of interest and group those segments.
Takes time to learn how to implement each method. Each user has to dig into each method one by one.
Method 1
flowchart LR
A1[Look for Code] --> A2[Install from CRAN] --> A3[Reshape Data] --> A4[Run Model] --> A5[Reshape Results] --> A6[Interpret]
Method 2
flowchart LR
B1[Look for Code] --> B2[Install from Github] --> B3[Determine Data Format] --> B4[Run Model] --> B5[Reshape Results] --> B6[Interpret]
Method 3
flowchart LR
C1[Look for Code] --> C2[Email Author] -->|Wait| C3[Generalize Code] --> C4[Run Model] --> C5[Reshape Results] --> C6[Interpret]
travelpaths contributer integrates each method one time
flowchart LR A1["Install travelpaths"] --> A2["Reshape data to travelpaths compatible format"] --> A4[Run Method 1] --> A6[Interpret] A2 --> B4[Run Method 2] --> B6[Interpret] A2 --> C4[Run Method 3] --> C6[Interpret]
Two (of many) ways to identify change points in animal movement data
travelpaths)Best Case Scenario (CVM)
Mid Case Scenario (CPT)
trackframe)CVM
Zlocation data. Can be: a complex vector, a two-column matrix or data frame, an ltraj object from adehabitatLT or a move object from the move package.
Ttime vector, ignored if Z is an ltraj or move
Note: move not move2
CPT
[not documented]
two column data.frame of coordinates
travelpaths)CVM
cvm_result <- sweepRACVM(
Z = my_data[, "utm.easting", "utm.northing"],
T = my_data$timestamp,
windowsize = 1000,
windowstep = 50,
model = 'UCVM'
) |>
findCandidateChangePoints(clusterwidth = 4) |>
getCPtable(modelset = 'UCVM', iterate = TRUE) |>
estimatePhases()CPT
Provided as a script, rather than as functions.
trackframe)CVM
start and end indicate the change points in time phase start end model eta tau rms
1 I 2015-12-15 23:18:00 2016-01-15 05:36:00 UCVM 434.1731 1.034823e-40 434.1731
2 II 2016-01-15 05:36:00 2016-02-01 01:10:00 UCVM 379.6684 2.438886e-39 379.6684
3 III 2016-02-01 01:10:00 2016-02-26 03:40:00 UCVM 365.9379 7.802973e-29 365.9379
4 IV 2016-02-26 03:40:00 2016-02-28 03:44:00 UCVM 346.7161 8.921303e-36 346.7161
5 V 2016-02-28 03:44:00 2016-04-01 03:12:00 UCVM 399.3652 1.112064e-32 399.3652
CPT
Results in a vector of indices of start and end of each segment
> start
[1] 6 52 189 222 282 419 440 470 516 692 731 755 876 887 889Method authors’ design choices are not inherently bad.
However, inconsistancy among designs results in a system that takes work to navigate.
travelpathsSimilar to parsnip, user
fit(model, data).CVM
CPT
Framework is extensiable.
Fit functions:
Enabled by trackframe package.
CVM
>cvm_fit$fit
A <move2> with `track_id_column` "id" and `time_column` "time"
Containing 1 track lasting 2.73 days in a
Simple feature collection with 1000 features and 3 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: -0.009335803 ymin: -0.002704142 xmax: 0.001792057 ymax: 0.02229348
Projected CRS: WGS 84 / UTM zone 32N
First 10 features:
time id cvm_model geometry
1 2025-10-14 15:48:34 track_1 1 POINT (0 0)
2 2025-10-14 15:49:34 track_1 1 POINT (-4.847714e-05 2.8431...
3 2025-10-14 15:50:34 track_1 1 POINT (0.0005120919 3.69360...
4 2025-10-14 15:51:34 track_1 1 POINT (-0.0002322027 0.0003...
5 2025-10-14 15:52:34 track_1 2 POINT (-0.0003615696 0.0012...
6 2025-10-14 15:53:34 track_1 2 POINT (-0.001313898 0.00116...CPT
>cpt_fit$fit
A <move2> with `track_id_column` "id" and `time_column` "time"
Containing 1 track lasting 2.73 days in a
Simple feature collection with 1000 features and 3 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: -0.009335803 ymin: -0.002704142 xmax: 0.001792057 ymax: 0.02229348
Projected CRS: WGS 84 / UTM zone 32N
First 10 features:
time id cpt_segment geometry
1 2025-10-14 15:48:34 track_1 1 POINT (0 0)
2 2025-10-14 15:49:34 track_1 1 POINT (-4.847714e-05 2.843...
3 2025-10-14 15:50:34 track_1 2 POINT (0.0005120919 3.6936...
4 2025-10-14 15:51:34 track_1 2 POINT (-0.0002322027 0.000...
5 2025-10-14 15:52:34 track_1 2 POINT (-0.0003615696 0.001...
6 2025-10-14 15:53:34 track_1 2 POINT (-0.001313898 0.0011...cvm_model, cpt_segment columns identify which segment each data point is part of.
Based on tinyplot therefore tinyplot themes can be applied.
trackframe stable version on github
travelpaths stablizing, will support three methods at launch
Plan to submit to CRAN by the end of the summer.
Longer Term: Set the standard for Movement Ecology modeling interface.
Collaboration between Max Planck Institute of Animal Behavior and Quintik Technologies.
linkedin.com/in/brock-2963987a/ 😈 github.com/katrinabrock
Catch me on rOpenSci and Carpentries slack communities