PhysMove: Space-Use Patterns

Hannah J. Calich, Jorge Rodríguez, Víctor Eguíluz & Ana M. M. Sequeira

Last updated: 2026-07-25

Index

  1. Introduction and data preparation
  2. Movement patterns
  3. Space-use patterns
  4. Intraspecific movements

Space-use patterns

PhysMove includes two metrics for identifying space-use patterns that are based on four functions, including:

Community-wide movements

Interactions between species’ movements and space-use can be described using a network analysis algorithm called Infomap, which identifies communities where animals follow similar movement patterns and remain for extended periods. To identify Infomap communities, PhysMove requires the infomapecology R package, the emln R package, and a stand-alone Infomap file.

Installation instructions for both packages and the Infomap file are available here: http://infomapecology.ecomplab.com/installation. Further details can be found in Farage et al. (2021). The following instructions assume both the infomapecology and emln R packages and the stand-alone Infomap file have been installed.

The infomapCommunities() function identifies community-wide movements in two steps. First, infomapCommunities() calculates the probability of individuals moving between specific grid cells along their track within a predetermined time window. This step creates a transition probability matrix (tpm), which can also be referred to as a “unipartite edge list”. Next, infomapCommunities() feeds the transition probability matrix into functions from the emln and infomapecology R packages to create an Infomap monolayer object that identifies movement communities.

To ensure the infomapecology algorithm calculates movement patterns consistent with telemetry data, we assign parameters to the infomapecology function that allow for directed movement, self-links (i.e., individuals can remain in the same grid cell over time), and hierarchical partitioning (i.e., resulting communities can be composed of multiple levels). Because we allowed hierarchical partitioning, the resulting communities are associated with different levels. Level 1 communities are the most inclusive and have been used to identify community-wide movements (following Rodríguez et al. 2017 and Calich et al. 2021).

The infomapCommunities() function requires a data frame with telemetry data (see data formatting) and includes five optional parameters:

infomapCommunities() outputs a list with up to two list objects. The first list object is an infomap monolayer object that summarizes the hierarchical structure of the Infomap communities (regions where individuals follow similar movement patterns and are likely to stay for longer periods of time). The second list object is the transition probability matrix, which is only output if tpm=TRUE.

Important: Before running infomapCommunities() you must:

  1. Set your working directory to the folder that contains the stand-alone Infomap file using setwd()

  2. Load the infomapecology R package using library(infomapecology)

# Identify community-wide movements 
infomapResult <- infomapCommunities(tracks)
# View the Infomap monolayer object structure
str(infomapResult[["infomap_object"]])
#> List of 8
#>  $ call     : chr "./infomap infomap.txt . --tree --seed 123 -N 100 -f directed --silent"
#>  $ L        : num 2.3
#>  $ m        : num 4
#>  $ modules  : tibble [494 × 14] (S3: tbl_df/tbl/data.frame)
#>   ..$ node_id      : num [1:494] 1 2 3 4 5 6 7 8 9 10 ...
#>   ..$ node_name    : chr [1:494] "Node1" "Node2" "Node3" "Node4" ...
#>   ..$ flow         : num [1:494] 0.000439 0.00222 0.00276 0.000209 0.001588 ...
#>   ..$ levels       : num [1:494] 3 3 3 3 3 3 3 3 3 3 ...
#>   ..$ module_level1: num [1:494] 3 3 3 3 3 3 3 3 3 3 ...
#>   ..$ module_level2: num [1:494] 7 7 7 5 5 5 7 5 7 5 ...
#>   ..$ module_level3: num [1:494] 3 3 1 5 5 3 1 1 2 1 ...
#>   ..$ module_level4: num [1:494] 2 1 1 2 1 1 2 1 1 3 ...
#>   ..$ module_level5: num [1:494] NA NA NA NA NA NA NA NA NA NA ...
#>   ..$ module_level6: num [1:494] NA NA NA NA NA NA NA NA NA NA ...
#>   ..$ module_level7: num [1:494] NA NA NA NA NA NA NA NA NA NA ...
#>   ..$ cell         : num [1:494] 496083 497523 498963 497524 497525 ...
#>   ..$ long         : num [1:494] 0.625 0.625 0.625 0.875 1.125 ...
#>   ..$ lat          : num [1:494] -3.88 -3.62 -3.38 -3.62 -3.62 ...
#>  $ edge_list:'data.frame':   2298 obs. of  3 variables:
#>   ..$ from  : chr [1:2298] "Node2" "Node1" "Node2" "Node12" ...
#>   ..$ to    : chr [1:2298] "Node1" "Node2" "Node2" "Node2" ...
#>   ..$ weight: num [1:2298] 0.2 1 0.6 0.125 0.1 ...
#>  $ L_sim    : NULL
#>  $ m_sim    : NULL
#>  $ pvalue   : NULL
#>  - attr(*, "class")= chr "infomap_monolayer"

Plot Infomap communities

communityMap() visualises results from infomapCommunities() by converting the Infomap monolayer object into a map (Figure V13).

The communityMap() function requires the full output list from infomapCommunities(), from which Infomap monolayer object is extracted internally, and includes two optional parameters:

# Create a map of the Infomap communities
communityMap(infomapResult)

Figure V13 Map illustrating level 1 Infomap communities from the 'tracks' dataset determined using infomapCommunities() default parameters. Map created with communityMap() default parameters.

Back to top

Occupancy patterns

The occupancy() function helps describe species’ space-use patterns by calculating the total number of location estimates within each grid cell divided by the grid cell’s area, calculated using spherical coordinates (Figure V14).

occupancy() requires a data frame with telemetry data (see data formatting) and includes three optional parameters:

occupancy() outputs a data frame of all results, including:

# Create an occupancy map based on the tracks dataset
occ <- occupancy(tracks)

Figure V14 Map of occupancy patterns from the 'tracks' dataset. Map created with occupancy() default parameters.

# Summarize occupancy results
summary(occ) 
#>     Latitude         Longitude           Area           Counts      
#>  Min.   :-3.8750   Min.   :-2.625   Min.   :771.0   Min.   :  1.00  
#>  1st Qu.:-1.3750   1st Qu.: 0.625   1st Qu.:772.2   1st Qu.:  8.00  
#>  Median : 0.0000   Median : 1.625   Median :772.5   Median : 20.00  
#>  Mean   : 0.0754   Mean   : 1.743   Mean   :772.4   Mean   : 31.63  
#>  3rd Qu.: 1.3750   3rd Qu.: 3.125   3rd Qu.:772.7   3rd Qu.: 41.75  
#>  Max.   : 3.8750   Max.   : 5.625   Max.   :772.8   Max.   :223.00  
#>    Occupancy       
#>  Min.   :0.001294  
#>  1st Qu.:0.010357  
#>  Median :0.025906  
#>  Mean   :0.040936  
#>  3rd Qu.:0.054041  
#>  Max.   :0.288579

Probability density function of occupancy results

A pdf of the results from occupancy() can be plotted with the plotPDF() function when the desc parameter is set to “occupancy” (Figure V15).

# Create a pdf plot of occupancy values
pdf.occ  <- plotPDF(occ$Occupancy, desc="occupancy")

Figure V15 Probability density function (pdf) plot of occupancy values for the tracks dataset calculated with occupancy() default parameters. Plot created using plotPDF() with desc="occupancy".

Proceed to Intraspecific Movements

Back to top