CRAN Task View: Processing and Analysis of Tracking Data

Maintainer:Rocío Joo and Mathieu Basille
Contact:rocio.joo at globalfishingwatch.org
Version:22.01 (2022-01-27)
URL:https://CRAN.R-project.org/view=Tracking
Source:https://github.com/cran-task-views/Tracking
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.
Citation:Rocío Joo and Mathieu Basille (22.0). CRAN Task View: Processing and Analysis of Tracking Data. Version 22.01 (2022-01-27). URL https://CRAN.R-project.org/view=Tracking.
Installation:The packages from this task view can be installed automatically using the ctv package. For example, ctv::install.views("Tracking", coreOnly = TRUE) installs all the core packages or ctv::update.views("Tracking") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.

This CRAN Task View (CTV) contains a list of packages useful for the processing and analysis of tracking data. If you just want to see what is new in this version of the CTV, click here. See below how to cite the Tracking CTV.

Movement of an object (both living organisms and inanimate objects) is defined as a change in its geographic location in time, so movement data can be defined by a space and a time component. Tracking data are composed by at least 2-dimensional spatial coordinates (x,y) and a time index (t), and can be seen as the geometric representation (the trajectory) of an object’s path. The packages listed here, henceforth called tracking packages , are those explicitly developed to either create, transform or analyze tracking data (i.e. (x,y,t)), allowing a full workflow from raw data from tracking devices to final analytical outcome. For instance, a package that would use accelerometer, gyroscope and magnetometer data to reconstruct an objects’s trajectory—most likely an animal’s trajectory—via dead-reckoning, thus transforming those data into an (x,y,t) format, would fit into the definition. However, a package analyzing accelerometry series to detect changes in behavior would not fit. See more on this in Joo et al. (2020) . Regarding (x,y), some packages may assume 2-D Euclidean (Cartesian) coordinates, and others may assume geographic (longitude/latitude) coordinates. We encourage the users to verify how coordinates are processed in the packages, as the consequences can be important in terms of spatial attributes (e.g. distance, speed and angles).

The packages included here are mainly tracking packages though we include a subsection of other movement-related packages. The packages are mainly from CRAN and a few of them are from other repositories. The ones that are not from CRAN were only included if they passed the check test ( R CMD check; more details here ). Core packages are defined as the group of tracking packages with the highest number of mentions ( Depends, Imports, Suggests) from other tracking packages; the cutpoint is estimated using the maxstat_test function in the coin package. At the beginning and middle of each calendar year, we will update the CTV, making an assessment on the non-CRAN packages here and remove the non-CRAN packages that do not pass the check test. Bioconductor packages are automatically accepted here as they are required to pass by a similar scrutiny than CRAN packages. We are also open to include more packages every time we update the CTV. We welcome and encourage contributions to add packages at any time. To open an issue on the GitHub repository, please use this link .

Besides these packages, many other packages contain functions for data processing and analysis that could eventually be used for tracking data or second/third degree variables obtained from tracking data; we encourage users to check other CRAN Task Views like SpatioTemporal, Spatial and TimeSeries.

This CTV was inspired on the review of tracking packages by Joo et al. (2020) , as an attempt to continuously update the list of packages already described in the review. Therefore, the CTV takes a similar structure as the review:

Diagram depicting the workflow for data processing and analysis in movement ecology. Three steps are identified: 1) Pre-processing, taking raw data as input and leading to tracking data as output (x, y, t); 2) Post-processing, manipulating tracking data as both input and output; 3) Analysis, which takes tracking data as input for visualization, track description, path reconstruction, behavioral pattern identification, space use, trajectory simulation, and others.

Pre-processing

Pre-processing is required when raw data are not in a tracking data format. The methods used for pre-processing depend heavily on the type of biologging device used. Among the tracking packages, some of them are focused on GLS (global location sensor), others on radio telemetry, accelerometry, magnetometry, or GTFS (General Transit Feed Specification) data.

Post-processing

Post-processing of tracking data comprises data cleaning (e.g. identification of outliers or errors), compressing (i.e. reducing data resolution which is sometimes called resampling) and computation of metrics based on tracking data, which are useful for posterior analyses.

Analysis

Visualization

The packages mainly developed for visualization purposes, and more specifically, animation of tracks, are anipaths and moveVis.

Track description

amt and trajr compute summary metrics of tracks, such as total distance covered, straightness index and sinuosity. trackeR was created to analyze running, cycling and swimming data from GPS-tracking devices for humans. trackeR computes metrics summarizing movement effort during each track (or workout effort per session). sftrack defines two classes of objects from tracking data, tracks (sf points in a time sequence) and trajectories (sf linestrings in a time sequence) and provides functions to summarize both showing starting and ending time, number of points, and total distance covered.

Path reconstruction

Whether it is for the purposes of correcting for sampling errors, or obtaining finer data resolutions or regular time steps, path reconstruction is a common goal in movement analysis. Packages available for path reconstruction are argosTrack, BayesianAnimalTracker (archived), bsam, crawl, ctmm, ctmcmove, foieGras and TrackReconstruction.

Behavioral pattern identification

Another common goal in movement ecology is to get a proxy of the individual’s behavior through the observed movement patterns, based on either the locations themselves or second/third order variables such as distance, speed or turning angles. Covariates, mainly related to the environment, are frequently used for behavioral pattern identification.

We classify the methods in this section as: 1) non-sequential classification or clustering techniques, 2) segmentation methods and 3) hidden Markov models.

Space and habitat use characterization

Multiple packages implement functions to help answer questions related to where individuals spend their time and what role environmental conditions play in movement or space-use decisions, which are typically split into two categories: home range calculation and habitat selection.

Trajectory simulation

Tracking packages implementing trajectory simulation are mainly based on Hidden Markov models, correlated random walks, Brownian motions, Lévy walks or Ornstein-Uhlenbeck processes: adehabitatLT, argosTrack, bsam, crawl, ctmm, momentuHMM, moveHMM, smam, SiMRiv and trajr.

Other analyses of tracking data

Dealing with movement but not tracking data

Citing and acknowledgments

If you would like to cite this CTV, we suggest mentioning: maintainers, year, title of the CTV, version, and URL. For instance:

Joo and Basille (2022) CRAN Task View: Processing and Analysis of Tracking Data. Version 22.01 (2022-01-27). URL: https://cran.r-project.org/view=Tracking

Besides the maintainers, the following people contributed to the creation of this task view: Achim Zeileis, Edzer Pebesma, Michael Sumner, Matthew E. Boone (former CTV maintainer).

Early work resulting in the article at the base of this Task View, and thus the initial list of Tracking packages, was partially funded by a Human Frontier Science Program Young Investigator Grant (SeabirdSound - RGY0072/2017; R. Joo and M. Basille).

CRAN packages

Core:adehabitatHR, adehabitatLT, move, moveHMM.
Regular:acc, accelerometry, amt, animalTrack, anipaths, bayesmove, bcpa, bsam, caribou, crawl, ctmcmove, ctmm, diveMove, EMbC, foieGras, GGIR, gtfs2gps, m2b, marcher, momentuHMM, moveVis, moveWindSpeed, nparACT, pawacc, PhysicalActivity, recurse, rerddapXtracto, SDLfilter, segclust2d, sftrack, SimilarityMeasures, SiMRiv, smam, spatsoc, trackdem, trackeR, TrackReconstruction, TrajDataMining, trajectories, trajr, trip, tripEstimation, wildlifeDI.
Archived:argosfilter, BayesianAnimalTracker, BBMM, mkde.

Other resources