Animal daily mobility patterns analysis using resting event networks

Characterizing the movement patterns of animals is crucial to improve our understanding of their behavior and thus develop adequate conservation strategies. Such investigations, which could not have been implemented in practice only a few years ago, have been facilitated through the recent advances in tracking methods that enable researchers to study animal movement at an unprecedented spatio-temporal resolution. However, the identification and extraction of patterns from spatio-temporal trajectories is still a general problem that has relevance for many applications. Here, we rely on the concept of resting event networks to identify the presence of daily mobility patterns in animal spatio-temporal trajectories. We illustrate our approach by analyzing spatio-temporal trajectories of several fish species in a large hydropeaking river.


INTRODUCTION
New technological developments of digital tracking systems contribute to the production of an evergrowing volume of high resolution animal movement data. This new source of knowledge is crucial to better understand and visualize animal movements at different scales. It can thus provide insights to develop adequate conservation planning strategies that are flexible in space and time [1,2]. However, as it has arisen recently in many disciplines, dealing with large amount of data has brought to light new problems regarding the extraction of meaningful information from huge data sets [3,4]. Handling the spatio-temporal nature of this information is one of those.
Animal movement has long been observed and modeled through the lens of diffusive processes [5] and foraging theories [6] strongly focusing on the characteristic of the spatio-temporal trajectories such as speed or turning angles. As mentioned in [7], with our new abilities to collect high resolution spatio-temporal data over long periods of time, we can more and more concentrate our research on the analysis of individual movements. We can make an analogy here between animal and human movements [8]. The tendency for human individuals for revisiting locations [9,10] and their interactions with different types environment according to the time of day [11] can also be investigated in animal movement [12]. This is to some extent similar to the concept of spatial memory in animal movement [13]. One can for instance focus on the habitat uses and on potential regularities in animal spatial behaviors. Some examples include the identification of repeatedly visited home range areas [14], the space-time characterization of springbok movement [15], the cougars' changes in movement characteristics over time [16] and the repeated use of specific rest locations by female elephants [7]. However, they usually focus on long-term mobility behavior, and therefore the presence of daily spatio-temporal patterns is rarely investigated. * Corresponding author: maxime.lenormand@irstea.fr In this work, we are interested in identifying daily mobility patterns in fish spatio-temporal trajectories. We draw upon the recent advances in individual human mobility patterns modeling and analysis [17], and more particularly the concept of daily motifs [18] adapted to animal movements. For this purpose, we rely on network-based tools [19,20] that have been widely used this past ten years in ecology in general [21] and movement ecology in particular [22][23][24]. More precisely, we rely in this study on the concept of event network [25] that represents a powerful tool to extract a coarse-grained signature of spatio-temporal trajectories. We are interested in the connections between resting events, defined as the presence of an individual in a particular location during a time windows higher than a predetermined threshold. Hence, the nodes of the considered networks are defined in space and time and connected according to their spatiotemporal proximity. Network science offers a wide variety of tools and metrics to explore systematically the event network structure in order to identify statistically prevalent network communities and network motifs.
The general method proposed in this paper can be used to uncover animal daily mobility patterns. The next section describes in details the proposed approach. The guiding idea is that resting event networks can be extracted from spatio-temporal trajectories in order to identify animal daily mobility patterns ( Figure 1). These networks are then analyzed and compared with a null model preserving the observed events spatio-temporal characteristics to ensure that the patterns identified are not due to random configurations. We apply the method to analyze the daily mobility structure of different fish species in the Rhône River located in France. Although the temporal structure of the resting event network is mainly driven by the distribution of events duration and their day of occurrence, we show that it exists a spatial proximity between event occurring at similar hours but on different days. Finally, the method allows to capture daily mobility motifs in the global event network structure that are not reproduced by the null model.

Space
Time X X Figure 1. Illustration of the methodology used to extract resting event networks from spatio-temporal trajectories. Resting events are characterized by their duration, day of occurrence and location. A link is created between two events if they overlap in time on a daily basis. The weight of a link corresponds to the distance between events' location.

Data
The data set used for our analysis contains information about fish positions recorded with acoustic telemetry techniques between July and September 2009 in the Rhône River (France). These data were collected as part of a research project conducted in a 1.8 km long and 140 m wide river segment. The purpose of the project was to track the movements of 94 fish captured in June 2009 in the river segment. For more details about the experiment see [26,27]. In favorable areas, fish position can be received every 3 seconds. However, the signal can be subject to discontinuity in certain area of the river segment. Moreover, the presence of tagged fish in the study area can be very irregular and highly dependent on the fish individuals and the fish species. To assess the quality of the fish trajectory reconstruction, we segment each day of observation into 288 5-minute periods and compute the fraction γ of periods during which the position of the fish was recorded at least once. Based on this metric, we selected ten fish among the most frequently localized individuals that belong to three species: four barbels (barbus barbus), two catfishes (ictalurus melas) and four chubs (squalius cephalus). For each fish individual, we selected the ten days exhibiting the highest γ values. On average we detected the presence of the fish in the study area 85% of the day, with a minimum presence of 60% and a maximum of 100%. More details regarding the fish and day selection processes are available in Appendix ( Figure S1 and Figure S2).

Daily spatio-temporal trajectory
Fish trajectories are characterized by a sequence of visited locations. To build these sequences, both time and space need to be discretized. Each day is segmented into 288 5-minute periods and the river segment is divided into a regular grid composed of square cells of lateral size 20 meters. Each 5-minute period is assigned a location (i.e. a grid cell) if a position was recorded in that time interval. If no position is recorded during a time period, we assign it an unknown location. If the presence of a fish is detected into several grid cells in a given 5-minute period, we choose the cell with the highest number of records. In the event of a tie, one of them is drawn at random. Nevertheless, in most of the cases, fish individuals spend most of their time in one location during a time interval (Figure S3a in Appendix). At the end of the process, we obtain 100 daily spatio-temporal trajectories (ten days for each of the ten selected fish). A daily trajectory is represented by a spatio-temporal sequence S = {X 1 , ..., X T } of locations at which a fish was observed at each consecutive 5-minute interval (T = 288). It is important to note that some of these locations are unknown. However, the periods during which the presence of a fish is not detected in the study area during the selected days represents on average less than 15% of the time. Moreover, consecutive time periods with unknown location last generally less than fifteen minutes ( Figure S3b in Appendix).

Resting event networks
The daily spatio-temporal trajectories defined in the previous section can be decomposed in a succession of events devoting to different fish "activities". An event e is a sub-sequence S e ⊆ S of consecutive locations. It is characterized by a starting time period t e and a duration ∆ e . In this work, we consider that a resting event r occurs when a fish rests in the same location during at least λ consecutive time periods (∆ e ≥ λ). We assume than unknown locations are always associated with non resting event whatever their duration. We only consider resting event starting and ending during the day (i.e. t e > 1 and t e + ∆ e − 1 < 288).
For each fish, we obtain a collection of resting events R representing every resting events identified among the ten daily spatio-temporal trajectories. Whether an event belongs or not to R depends on the threshold λ. Indeed, if λ = 1 all the events are considered as resting events, and inversely, if λ > 288 the entire trajectory will be consider as a non resting event. We may assume that the chosen value will depend on the type of animal but, in our case, the value λ = 3 (15 minutes) seems to be a good compromise allowing us to preserve a reasonable number of resting events per day (between 6 and 28) while minimizing the variability across daily spatio-temporal trajectories (see Figure S4 in Appendix for more details). Now that the nodes of the resting event networks are formally defined, we need to connect them according to their similarities from both the spatial and temporal point of views. To this end, we propose two similarity metrics, δ t and δ s , to link the events according to their spatio-temporal proximity. δ t computes the number of time periods shared by two events while δ s measures the spatial proximity between two events e and e ′ based on the euclidean distance d between the event locations S e and S e ′ (Equation 1). The distance is computed between the centroids of the cells where the events occurred.
In this work, we decided to focus on the temporal proximity to build the topological structure of the networks and on the spatial proximity to define the intensity of interactions between events. More specifically, a link is created between two events e ≠ e ′ if δ t (e, e ′ ) > 0 and the weight of a link between them is equal to δ s (e, e ′ ). It is worth noting that with this definition there is no link between events occurring the same day. At the end of the process, we obtain one weighted undirected spatio-temporal resting event network per fish.

Null model
To properly characterize the event networks and identify potential daily mobility patterns in fish trajectories we first need to define a null model (NM). Null model analysis are really useful to identify nonrandom patterns. In our case we need to generate random event networks preserving the observed events spatio-temporal characteristics: the number of events, the events duration and day of occurrence, and the spatial distribution of events. The topology of the resting event network introduced in the previous section is strongly constrained in time. Indeed, the probability P(δ t (e, e ′ ) > 0) of connecting two events in a random situation is highly dependent of the events' duration and whether they occurred on the same day or not. We can however take these temporal constraints into accounts by generating random networks' topology in which, for a given day, starting events time are drawn at random along the day. Regarding the spatial component of the network (i.e. link weights), we generate random distances δ s (e, e ′ ) by reshuffling the events' location, thus preserving the spatial distribution of events over the ten days of observation. Using this approach we generate 100 random event networks for each fish.

Network measures
Degree. Networks topology can be quantitatively described by a wide variety of measures. The most important of them is probably the node degree. The degree of a node is the number of connections that link it to the rest of the network. To evaluate to what extent the degree distributions are characteristic of the event networks structure, we will compare these distributions to the ones returned by the null models.

Dilatation index.
Resting event networks are also spatial networks. To characterize the spatial component of event networks we introduce the Dilatation Index (DI) defined as the average distance between connected events (i.e. δ t > 0). In order to contrast the results, two other dilatation indices are also considered, DI tot defined as the average distance between all the events, and, DI N M defined as the average distance between connected events generated with the null model described above.
Network community structure. Community structure is an important network feature, revealing both the network internal organization and similarity patterns among its individual elements. In this study we used the OSLOM algorithm proposed in [28] that  detects statistically significant network community with respect to a global null model (i.e. random graph without community structure). This algorithm is non-parametric is the sense that it returns the optimal statistically significant partition without defining the number of communities a priori. In our case, the purpose is to identify spatio-temporal communities clustering events exhibiting significant temporal and spatial proximity.
Network motifs. An interesting local network property are recurrent patterns, repeating themselves in a network, and usually called network motifs. In this study, a motif is defined as a displacement between spatio-temporal communities. Hence, for every fish and day of observation we can extract a list of daily motifs. Every motif is characterized by a community of origin and a community of destination that can be identical. Similarly to the method used in [29], the Sørensen index [30] is used to define matrices of similarity between list of daily motifs. This index varies from 0, when no agreement is found, to 1, when the two networks are identical. For each fish, we obtain 45 comparisons, each of them assessing the motifs similarity between two days of observation that can be used to investigate daily mobility patterns.

Resting event networks
Resting events. In order to get a preliminary grasp of the data we plot the resting event's spatial distribution in Figure 2. We observe that the resting event locations are more or less dispersed according to the fish individual. It seems however that there is no significant differences among species. We also plot several resting event characteristics in Figure  3. Despite some particularities according to the species, the selected fish shows globally similar event features. The average number of resting events per day, displayed in Figure 3a, lies between 15 and 20 with a standard deviation of 3 days. Regarding the duration of these events, fish tend to rest half of the day in average (Figure 3c) with a median resting event duration around 20 -30 minutes (Figure 3b). Although the difference is not significant some differences among species can be observed. Chubs tend to have a higher number of resting events but with a lower fraction of resting event duration and resting time than the two others species. It is also interesting to note that their resting event characteristics are more stable in time (i.e. day) particularly regarding the resting event median duration.
Event network topology. We now want to identify potential temporal patterns by comparing the observed event network topology with the one returned by the null model introduced in the method section. Some basic network properties are gathered in Table 1. The random network has more connections than the original one leading to a slightly higher average degree. The event network degree distribution is an important feature that allows for the identification of temporal patterns. However, the degree distribution alone is not very informative since a network constrained in time will naturally tend to exhibit a heavy tail distribution. A comparison with the degree distribution obtained with the null model is therefore crucial to identify any particular network topology. Figure 4 displays an example of such comparison for a barbel (see Figure S5 in Appendix for all fish). Although the observed and randomized degree distributions (top and left insets) are similar, the observed degree of a specific event can be very different from the one returned by the null model. This deviation from the random situation is a good indicator of the presence of patterns in resting events temporal distribution. We observe that degree of events with a very low observed degree increased systematically in random situation. Short resting events are therefore less connected that they should be. Conversely, the highly connected events of some fish ( Figure S5) are less connected in the observed network than in random conditions. It means that events that should be connected according to their long duration and day of occurrence are not connected. Howerver, this is not the case for most of the fish whose temporal event network structure does not deviate substantially from the one return by the null model (see Figure S5).
To conclude, we observe differences between observed and random network topologies. Nevertheless, the presence of patterns in the temporal structure of the fish event networks remains unclear. For most fish it seems indeed mostly driven by the distribution  of events duration and their day of occurrence than specific temporal patterns.
Spatio-temporal structure. To investigate the relationship between space and time in the resting event dis- tribution we compute the dilatation index based on fish event locations for different network configuration. All the metrics based on the null model (NM) have been average over 100 replications. Table 1 presents the results obtained for each fish. We observe that except for the second catfish the dilatation index measure in the observed network (DI) is lower than the one measured in the null model (DI N M ). The latter is actually equivalent to the dilatation index DI tot defined as the average distance between all the events not only the connected ones. This observation suggests that there are spatio-temporal patterns hidden in the fish resting event networks analyzed in this study. Implying that a temporal proximity between resting events leads to a spatial proximity between events' location.

Event network community analysis
In order to go further in the analysis of fish resting events spatio-temporal structure we perform a network community analysis for each of the ten selected fish. We first rely on the number of communities to assess the community structure obtained with the OSLOM algorithm. We observe in Table 2 that resting events can be globally clustered in a dozen of spatio-temporal communities. Note that this number can vary by a factor of two from one fish to another. Chubs tend to have more communities than the other fish, probably due to the fact that they have more and shorter resting events than the two others species. Figure 5 shows a representation of the spatio-temporal distribution of communities according to their size (i.e. number of events). The temporal dimension is presented on the x-axis with the average time (hour of the day) at which the events occurred. The spatial dimension is presented on the y-axis with the community dilatation index between connected events belonging to a community normalized by the "global" dilatation index (DI in Table 1).
We observe different size of communities, the biggest community contains in average 17% of the events, but there is no evidence of existence of a relationship between the community size and its average time of occurrence. We shown in the previous section that a relationship between the temporal proximity of events and their spatial proximity exists. We observe in Figure 4 that this spatial proximity between connected events varies along the day with a community dilatation index more or less close to the global one (grey line) according to the hour of the day. Some communities exhibit a high dilatation index, up to three times DI, while others show a low dilatation index, sometimes close to 0. These deviations from the average may suggest different types of fish daily behaviors related to the heterogeneity of visited places according to the hour of the day.
In order to assess the significance of these results, we analyze the community structure, community size ( Table 2)  ure 6), obtained with the null model. As in Figure 4, Figure 6 represents the spatio-temporal distribution of communities but for one realization of the null model. In this case the dilatation index between connected events belonging to the communities is normalized by the "global" dilatation index obtained with the null model (DI N M in Table 1). The differences between observed and null communities in terms of number and size is not striking. However, the difference between global and community dilatation indices is lower for the resting network obtained with the null model that the observed resting event networks. We already shown that the dilatation index between connected events is significantly higher in random situation than in the observed one, but we also observed a temporal variation of the community dilatation index, not reproduce by the null model.
It is however not clear whether or not these spatiotemporal patterns corresponds to regularities due to the presence of fish daily motifs.

Daily motifs
With these event communities, we can now assess the similarity between fish daily motifs. As described in the methods section, each day of observation of a fish can be represented by list of network motifs defined as a intra-or inter-community displacement. We then calculate the Sørensen index between the ten lists of daily motifs for each fish. Figure 6 shows notched boxplots of the Sørensen index obtained with the observed daily motifs and the ones return by the null model. First, we observe that the similarity between daily motifs is globally low, with a median percentage of motifs in common ranging between 15 and 35 percents. Note that the some days are more similar than others with a high variability around the median value. Catfish tend to be more regular than the two other species but it is more due to the community structure than on a daily mobility routine. Indeed, the similarity obtained with the null model is also higher for the catfish than for the two other species. It is really interesting to note that the similarity between daily motifs is always significantly higher in the observed than the random situation (between 2 and 3 times higher). Therefore, the daily mobility motifs identified here are not due to random configuration, they are the sign of spatio-temporal regularities in fish daily mobility behaviors.

DISCUSSION
Being able to develop new statistical tools and methods to extract meaningful information from large data sets is crucial to enhance our comprehension of ecological systems. In this study, we contribute to this end by proposing a general method based on the concept of resting event network to analyze animal daily mobility patterns. We successfully applied this method on several fish species in a large hydropeaking river in France. In particular, we shown that, despite some particularities according to the species, resting events characteristics are remarkably stable among fish individuals. We also found that, despite a few exceptions, the temporal dimension of resting event structure is mainly driven by the distribution of events duration and their day of occurrence. However, the spatial proximity between events temporally connected is higher in the observed events than the ones generated with the null model. This finding has been confirmed with the network community analysis showing that the community structure in terms of number and size is very similar to the ones return by the null model but the presence of temporal variation of the spatial component of the communities is not reproduce by the null model. Finally, we extracted daily motifs and demonstrated the presence of significant regularities in daily fish mobility.
The example chosen to illustrate the methodology is based on a local data set and on a small sample of individuals. It would be interesting to apply the proposed approach to other animals such as big terrestrial and marine mammalians for example. Nevertheless, focusing on fish daily mobility pushed us to incorporate a null model in the analysis enabling us to put aside patterns due to spatio-temporal constraints but also to highlight non random regularities.
To conclude, given the importance of animal resting behaviors in conservation planning strategies, the future application and adaptation of the proposed methodology are numerous. Moreover, as it is often the case with network-based tools, we believe that a key feature of the proposed approach resides in its generic nature since it can be applied to any type of individual spatio-temporal trajectories.    Random degree Degree Figure S5. Comparison between observed and average random degree distribution. Each point represents an event with the observed average degree on the x-axis and the average degree obtained with the null model on the y-axis averaged over 100 replications (the error bars represents one standard deviation).