Ropensci detecting spatiotemporal groups in relocation data with spatsoc gas weed

#########

spatsoc is an R package written by Alec Robitaille, Quinn Webber and Eric Vander Wal of the Wildlife Evolutionary Ecology Lab ( WEEL) at Memorial University of Newfoundland. It is the lab’s first R package and was recently accepted through the rOpenSci onboarding process with a big thanks to reviewers Priscilla Minotti and Filipe Teixeira, and editor Lincoln Mullen.

spatsoc started as a single function (what would eventually become group_pts) written by Alec in 2017 to help answer some of the questions that Quinn and Eric were asking about how animal social structure is related to spatial processes. These ideas were originally proposed by Quinn and Eric in their recent review paper 1. electricity 2pm mp3 After our ideas were published, we began using this early function to determine when GPS collared caribou ( Rangifer tarandus) in Newfoundland were recorded within 50 m of one another, within 5 minutes. This spatiotemporal grouping allowed us to build and analyze social association networks with asnipe and igraph. Using animal telemetry data with social network analysis allowed us to draw new insights from a long term movement dataset.

Social network analysis (SNA) is a powerful tool for measuring associations and relationships between individuals with implications for disease transmission, species interactions and community structure. SNA uses graph theory and networks to reconstruct social structures, where nodes represent individuals and edges represent the relationships or associations between them. Social networks built from spatsoc results are explicitly association networks, with the edges being defined by the spatiotemporal grouping of relocations as opposed to observed social interactions. Spiegel et al. 2 showed that combining social network analysis with telemetry data of sleepy lizards can reveal insights about social structures in which the individuals and their behaviours that shape it are otherwise difficult to directly observe. Animal telemetry data

The quantity and accessibility of animal movement data is increasing. A number of recent articles have suggested we are in a “golden age of animal tracking science” with large, extensive movement datasets being collected for a diversity of species, many of which are publicly available 3. Movebank is a global data archive of animal movement data, with over 800 taxa and 1 billion relocations. gas company It also hosts an archive of published datasets with accompanying DOI and licenses used in over 100 publications, backed by a formal review process to ensure data quality.

Animal telemetry technology is improving rapidly, as battery systems improve and sensors become smaller. Deployments of more advanced biologging devices on animals means less frequent captures to redeploy and more continuous data. ICARUS (the International Cooperation for Animal Research Using Space) is a collaborative project using GPS and 3D accelerometry loggers powered by solar panels and rechargeable batteries to produce continuous, high temporal and spatial resolution data. The goal of ICARUS is to use this data to better understand movement of animals and selecting forces that act on individuals and contribute to our understanding of health, disease epidemics and even potentially predict volcanoes and earthquakes!

The spatiotemporal grouping of spatsoc can lead to many outcomes. physics c electricity and magnetism study guide We developed it to build proximity based social association networks from GPS relocation data but others may use it to measure species interactions or shared space use among con- or hetero-specifics. We are not restricted to dyadic interactions since spatsoc groups relocations for all individuals in space and time. spatsoc’s flexible functions let user define spatial and temporal grouping thresholds. Package installation

For this example, we will use bison data from the “Dunn Ranch Bison Tracking Project” (Max Planck Institute and Nature Conservancy Missouri) available on Movebank here. We will import the downloaded data (CSV format) with data.table’s fread. This function is fast when data gets big and data.table is the required format for all DT arguments in spatsoc.

Note: to download the data from Movebank you will need to make an account and accept the terms of the data. v lab electricity We are only going to use a subset of the available data for this example and we have renamed the downloaded file to Bison.csv for brevity. Lastly, select “Add UTM coordinates” on the download page to ensure we have projected coordinates ready for spatsoc. # Load packages

spatsoc was submitted to rOpenSci on July 16 2018 and accepted on October 26 2018. Based on feedback during the review process, the package documentation and usability were greatly improved. The rOpenSci onboarding process represented a different standard than CRAN, where test coverage, useful documentation and goodpractice were just as important as getting 0 errors | 0 warnings | 0 messages. We really appreciated the common goal of improving the package shared by package authors, rOpenSci reviewers, and editor.

The package building process gave us a better understanding of how the functions and packages we use in our analyses are built. Using powerful tools like unit testing and CRAN checks we could ensure our code was well written. Alec was really surprised how much he enjoyed writing unit tests, thinking of all the different ways things could fail and setting up the necessary framework to prevent it, returning useful warnings and errors when it did.

In the future: more packages! For personal use, for fun, and for sharing new methods and tools with the R community. gas weed The flexibility and power of the package as a fundamental unit of sharing functions (and data, projects, etc.). Next time, we will write unit tests and documentation as we go (hopefully!). We are looking forward to engaging in more collaboration opportunities in the R community through the rOpenSci onboarding process as authors and reviewers or less formally through Pull Requests or Issue Boards. Resources