Navigating through the R packages for movement

In the biologging Special Issue of the journal, we have new Review paper lead by Rocío Joo on Navigating through the r packages for movement. Rocío is a movement statistician based at the University of Florida and the blog tells the story behind the paper and a brief overview of the paper.

Behind the scenes

Two years ago, if someone would have asked me about R packages developed specifically to deal with movement, I would have answered adehabitatLT. adehabitatLT is a complete package that transforms a data frame of locations, time stamps, and individual ID into a ltraj object, that allows visual exploration of tracking data, resampling, segmentation and simulation of trajectories, among other tasks. A few months later I saw a presentation of moveHMM and momentuHMM, two packages to fit Hidden Markov models to tracking data. While moveHMM is more user friendly, momentuHMM has more features, like inserting covariates into the model and accepting a larger number of observed variables.

This made me wonder if people knew about the existence of both packages and if so, how would they choose between them. Would they check what’s behind the models of both packages to understand the differences between them? Would they thoroughly read the documentation of both? Or would they just use what everybody else is using or whatever a more knowledgeable colleague would recommend? What about other movement analyses? Would there be other R packages performing analyses on movement? I started looking for packages and asking colleagues about the packages they used to analyze or process tracking data. Soon, the list became large. I started playing with those packages, some of them had great documentation and I could immediately understand what they were for and how to use them. Some were confusing, the documentation was not great and I struggled to understand what the package could allow me to do. I also found that many packages had very similar functions. Moreover, I noticed that in some cases the description of the package maintainer was not up-to-date: the email address was not working anymore, probably because the person had changed jobs, and probably meaning that they were not maintaining the package anymore.

Joo 1

The list of R packages was way larger than expected

A systematic review of R tracking packages

All of this inspired me to write a review of R packages created to process or analyze tracking data, that I called tracking packages. A systematic search for packages and review of their functions was performed. To describe the packages based on their functionality, and present them in a way that ecologists (and movement researchers) from different brackgrounds would understand, was a complicated task, and I am grateful for the coauthors of the article for their help and insights at different stages of this work.

We prepared the review as an introduction to this set of packages for researchers, and to provide feedback and recommendations to package developers, from a user perspective. We described each package based on a workflow centred around tracking data, broken down in three stages: pre-processing, post-processing, and analysis (see Fig. below).

Joo 2

The tracking data workflow

The tracking data workflow

Based on a user survey, we reviewed the quality of packages’ documentation, and identified 11 packages with good or excellent documentation. We also assessed the links between packages through a network graph analysis, exposing a fragmentation in the R-movement community.

Joo 3

Quality of package documentation rated by users

With all these elements, we reflected on the importance of maximizing the usability of the packages (clear documentation about its use, and about the methods behind the functions), and of working as an integrated scientific programming community. We encourage developers to pass through rOpenSci’s peer-review process to improve the quality of their packages. We also discuss the responsibility of movement ecologists to make sure that they understand what a package does before publishing results with them!

So that’s what the paper is about. Whether you’re new to movement ecology or to R, or an expert in either, I hope you’ll find this work useful. I sure did. In the process, I found out about many different packages I didn’t know existed, I learned how tagging devices work, about the methods of data analysis, and about rOpenSci. And I learned more about developing packages and have more respect and gratitude to developers who take it on themselves to publish incredibly useful packages.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s