Use of Predicted Behavior from Accelerometer Data Combined with GPS Data to Explore the Relationship between Dairy Cow Behavior and Pasture Characteristics

Our aim in this study was to investigate whether the behaviors of dairy cows on pasture, predicted with accelerometer data and combined with GPS data, can be used to better understand the relationship between behaviors and pasture characteristics. During spring 2018, 26 Holstein cows were equipped with a 3D-accelerometer and a GPS sensor fixed on a neck-collar for five days. The cows grazed alternatively in permanent and in temporary grasslands. The structural elements, soil moisture, slope and botanical characteristics were identified. Behaviors were predicted every 10 s from the accelerometer data and combined with the GPS data. The time-budgets expressed in each characterized zone of 8 m × 8 m were calculated. The relation between the time-budgets and pasture characteristics was explored with a linear mixed model. In the permanent grassland, dairy cows spent more time under a tree to ruminate (p < 0.001) and to rest (p < 0.001) and more time to graze in areas with Holcus lanatus (p < 0.001). In the temporary grassland, behavior was influenced by the external environment (presence of other animals on the farm; p < 0.05). Thus, this methodology seems relevant to better understand the relationship between the behaviors of dairy cows and grazing conditions to develop precision grazing.


Introduction
Agro-ecology aims to develop practices to improve animal health and welfare and reduce farming environmental impacts while increasing farm profitability [1]. A better understanding of the interactions between the behavior expressed by ruminants on pasture and their environment, including vegetation, structural characteristics, soil moisture, etc., could be a way of making progress towards these objectives. As explained by Carvalho et al. [2], monitoring ruminant behavior is a way to achieve optimal plant production, animal forage intake and performances through a better understanding of how animals meet their requirements by grazing a dynamic vegetation. Investigating individual behaviors in relation to the environment could also help in targeting preventive treatments based on the exposure to specific risks [3]. Indeed, ruminants at pasture are more likely to develop certain diseases depending on the areas used [4,5]. A fine knowledge of the amount of time spent in areas associated with an increased risk of disease by individual animals could help to identify animals at risk and treat them specifically. Identifying over-used areas could also reduce the environmental impact at the farm level. Important amounts of cow excreta on small areas may lead to localized releases of nitrogen into the soil. Identifying such areas could help to adapt management practices accordingly [6]. Finally, focusing on the relationship between ruminants and their environment is probably an interesting way to explore changes of behavior due to challenging situations [7]. For example, Putfarken et al. [8] showed that cows preferentially grazed close to drinking troughs when the temperature was high, suggesting that a fine understanding of the relationship between animals and their environment should help to identify patterns of discomfort at grazing.
Such an investigation requires continuous and automatic information on the position and behavior of ruminants, i.e., with a high frequency and without human intervention. The Global Positioning System (GPS) has already been used both to predict the behavior of ruminants [9] and to geolocalize them in pastures [8]. Although the GPS does not seem appropriate for predicting behaviors in a robust way [10], this geolocation system seems promising for locating animals with a high frequency and with a low error (3.9 m ± 0.8 m standard error with uncorrected data [11]). Moreover, Putfarken et al. [8] fixed GPS sensors on cattle and sheep to elucidate which vegetation types are preferentially used and whether animal preferences change through the seasons in semi-open cultural landscapes. However, the behaviors expressed on trajectories were not known in this study. Three-dimensional accelerometer sensors have also already been used to predict and collect states (standing, lying, walking, etc.) [12] or unitary behaviors (biting, chewing) [13] with a high frequency and an accuracy higher than 90%. Although the range of correctly predicted behaviors is not sufficient in these studies to explore finely the interactions between animals and their environment, the combination of (i) predicted behaviors from accelerometer data with (ii) the corresponding position of ruminants on the pasture collected with GPS sensors is certainly a promising approach to explore the interactions between ruminants and their environment.
In two previous studies, a methodological framework was developed to predict a large range of behaviors of dairy cows on pasture from accelerometer data every 10 s, including grazing, walking, resting and ruminating both in lying and standing postures [14,15]. These predicted behaviors could now be combined with the position of the cows using the GPS data collected on animals. In this study, we propose to investigate whether such a combination could be used to relate the expressed behaviors at grazing to the pasture characteristics.

Materials and Methods
An overview of the applied methodological framework is provided in Figure 1.

Farm, Animal and Sensors Description
Data collection was carried out in a 71 Holstein (milk yield: 10,000 kg per year) commercial farm in La Pommeraye, France (N 47 • 21 21", O 0 • 51 33") in May 2018. The average parity of the cows was 2.50 ± 1.40 (mean ± sd) and the average day in milk was 250 ± 167 (mean ± sd). Cows were milked using an automatic milking system (AMS) (milking count per day: 2.4 ± 0.7 (mean ± sd)) and they received a supplementation of triticale, peas and feverole (1.83 kg DM/cow) and a supplementation of feverole (0.13 kg DM/cow) after each AMS visit. During each grazing rotation, the 71 cows grazed in a first pasture from 05:00 h to 11:00 h and in a second one from 11:00 h to 18:00 h and from 21:00 h to 05:00 h. However, as cows (i) had to return to the barn to be milked and (ii) could stay in the barn instead of grazing, there were not always 71 cows on pasture at the same time. Cows were also held in the barn from 18:00 h to 21:00 h and received alfalfa forage (1.5 kg DM/cow) during this period.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 31 Figure 1. Overview of the main steps applied in the Material and Methods section.

Farm, Animal and Sensors Description
Data collection was carried out in a 71 Holstein (milk yield: 10,000 kg per year) commercial farm in La Pommeraye, France (N 47°21′21″, O 0°51′33″) in May 2018. The average parity of the cows was 2.50 ± 1.40 (mean ± sd) and the average day in milk was 250 ± 167 (mean ± sd). Cows were milked using an automatic milking system (AMS) (milking count per day: 2.4 ± 0.7 (mean ± sd)) and they received a supplementation of triticale, peas and feverole (1.83 kg DM/cow) and a supplementation Twenty-six dairy cows were chosen to be representative of the herd in terms of parity and days in milk. During the experiment, the lactation stages ranged between 16 and 253 days in milk (153.7 ± 61.0 (mean ± sd)), with the parity ranging between one and seven (2.7 ± 1.6 (mean ± sd)). The parities and days in milk of the herd and of the selected cows at enrolment are provided in Appendix A (Table A1).
A RF-Track datalogger (RF-Track, Rennes, France) comprising a LSM9DS1 three-axis accelerometer (STMicroelectronics, Geneva, Switzerland) ±2 g and a GPS sensor (part number EVA-7M-0, µ-Blox, Thalwil, Switzerland) with a static position error estimated at ±1.72 m was used. Data were collected at 59.5 Hz and 1 Hz for the accelerometer data and GPS data, respectively. The sensors were powered with two 3.7 V lithium batteries (2.6 Ah). Data were stored on a secure digital card and downloaded after the experiment. The dataloggers were 98.2 mm × 51.60 mm× 36.0 mm in size and weighed 250 g. The dataloggers were fixed on a collar and positioned on the right side of the neck. The collars were tightly adjusted and a 500 g counterweight was added to prevent them from turning around. The x-axis detected the up-down direction, the y-axis detected the backward-forward direction and the z-axis detected the left-right direction.

Accelerometer and GPS Data
Collars were mounted on the 26 chosen animals at 5:00 p.m. on 30 April 2018 and removed 5 days later at the same time, which corresponds to both the duration of the complete grazing rotation and the autonomy of the sensor battery. It should be noted that a period of habituation to the device by the cows was not necessary as the complete device represented approximately 0.1% of the animal's weight [16]. The data collected from 21:00 h to 05:00 h were not used in this study to focus on the daytime behavior exclusively.

Weather
The temperatures ranged from 4 • C at the coldest time of day to 20 • C at the warmest time of day, except on the second and last day where the temperature dropped to 1.9 • C and reached 23.2 • C, respectively. The precipitation was less than 1 mm each day except for the second day where 3.2 mm were recorded. The wind speed was less than 40 km/h except on the second day (maximum gusts: 43.2 km/h). An average of 9.8 h of sunshine was recorded, with a minimum of 2.06 h on the second day and a maximum of 13.34 h on the last day [17].

Grass Height and Herbage Allowance
During the 5 days of the experiment, 71 dairy cows grazed in a first pasture of 1.6 ha from 05:00 h to 11:00 h and in a second one of 2.3 ha from 11:00 h to 18:00 h and from 21:00 h to 05:00 h. An average grass height of 15 cm was measured before the study period in each paddock based on 97 measures per ha using the GrassHopper plate meter [18]. Based on a usual density of 250 kg DM/ha/cm, the herbage mass was 2500 kg DM/ha > 5 cm. Considering a total area of 3.9 ha for 71 dairy cows during 5 days of grazing, the herbage allowance was therefore 27.5 kg DM/cow/day.

Structural and Botanical Characteristics
The characteristics were collected in the paddocks grazed during the experiment. The first paddock was a permanent grassland of 1.6 ha (thereafter referred to PG). The second paddock was a temporary grassland of 2.3 ha (thereafter referred to TG). The locations of the structural elements, slope and moist soil areas are provided in Figure 2. Sensors 2020, 20, x FOR PEER REVIEW 5 of 31 The pasture characteristics considered in each paddock are the following: (i) The structural characteristics in the paddock including trees, hedges and boundaries were identified and geolocated (longitude and latitude) using the data from the French's National The pasture characteristics considered in each paddock are the following: (i) The structural characteristics in the paddock including trees, hedges and boundaries were identified and geolocated (longitude and latitude) using the data from the French's National Geographic Institute [19]. The locations of structural elements in each paddock are illustrated in Figure 2a. (ii) The steepest slopes were located in the paddocks using the data from the French's National Geographic Institute data [19]. The slopes ranging between 10% and 20% were referred to as a "moderate slope" and slopes higher than 20% were referred to as a "steep slope". The remaining slopes were referred to as a "low slope" by default. Slopes in the paddocks are shown in Figure 2b. (iii) The soil moisture was considered in the paddocks. Moist soil areas were located in the paddocks using the data from the French's National Geographic Institute [19]. Such areas were referred to as "moist soil" and the remaining areas were referred to as "dry soil" by default. The soil moisture in the paddocks is provided in Figure 2c. It should be mentioned that no moist soil area was found in the TG. (iv) The plant species were identified and recorded using a method based on the quadrat method [20,21].
Approximately 97 measures per hectare were carried out in each pasture, corresponding to 165 measures in the PG and 182 in the TG. For every measure, a rating ranging between 1 and 10 was attributed to the five most represented species in the area. The more a plant species was represented in the area, the closer its rating was to 10. The other plant species identified in the area were only noted without a rating. The bare ground was also considered in the rating. Seventy-six different plant species were identified in the PG and 41 in the TG. Each measure was also geolocated in the paddock based on the geolocation data obtained during grass height measurements with the GrassHopper plate meter (Section 2.1.2).

Dataset Preparation
The purpose of this step was to process the raw data in order to obtain the geolocalized predicted behavior from the accelerometer and GPS data, as well as the groups of homogeneous pasture patches from the different pasture characteristics collected. This step was carried out for both the PG and TG, separately. Data used to construct the dataset are available in Supplementary Materials.

Prediction of Behaviors of Dairy Cows
This step aimed to predict the behaviors successively expressed by the 26 dairy cows over the experiment. We used a method described in two previous studies which allows a prediction of the main behaviors of dairy cows on pasture from accelerometer data with a high reliability (accuracy: 98%; Cohen's Kappa: 0.96) [14,15]. The six predicted behaviors are the following: • Grazing: biting, taking frequent bites or chewing and searching without raising the head.

•
Walking: movement from one location to another without lowering the head at ground level.

•
Ruminating while lying: lying with regurgitating rumen bolus before chewing and then re-swallowing.

•
Ruminating while standing: standing with regurgitating rumen bolus before chewing and then re-swallowing.

•
Resting while standing: standing without movement or rumination.
The steps carried out to develop this methodology are outlined in Appendix A ( Figure A1) and we refer to Riaboff et al. [14,15] for a detailed description. The successive steps applied in the present study are illustrated in Figure 3. First, the raw accelerometer sequences collected from the 26 dairy cows during the 5 days of grazing were split into segments (windows) of 10 s, with 90% of the data being in common with two consecutive windows (overlap). This pre-processing step was performed in Matlab R2018a. The eXtreme Gradient Boosting (XGB) model fitted by Riaboff et al. [14] was then directly used to predict the behaviors using the xgboost package [22] in R 3.6.1 [23]. At the end of this step, the behavior of each cow throughout every successive window of 10 s was predicted for all 5 days of grazing. The predicted behaviors in successive windows from the same cow over the entire experiment were finally smoothed using the hidden Markov model (HMM)-based Viterbi algorithm [24,25] applied with the R package HMM [26]. The HMM used to apply the Viterbi algorithm in this study was reported by Riaboff et al. [14].
Sensors 2020, 20, x FOR PEER REVIEW 7 of 31 algorithm [24,25] applied with the R package HMM [26]. The HMM used to apply the Viterbi algorithm in this study was reported by Riaboff et al. [14]. Figure 3. Description of the successive stages carried out in this study to obtain the predicted behaviors of dairy cows during the experiment.

Calculation of the Time-budget Expressed in Each Zone of the Pastures
The aims of this step were to (1) collect the position of cows in pastures while they were expressing a behavior and (2) compute the overall cow location and time-budget for every behavior expressed in every zone in the pastures per cow and per day.
The date and time associated to each record were collected for both the accelerometer and GPS data. The time synchronization between these two sensors was previously ensured. Each 10 s window

Calculation of the Time-budget Expressed in Each Zone of the Pastures
The aims of this step were to (1) collect the position of cows in pastures while they were expressing a behavior and (2) compute the overall cow location and time-budget for every behavior expressed in every zone in the pastures per cow and per day.
The date and time associated to each record were collected for both the accelerometer and GPS data. The time synchronization between these two sensors was previously ensured. Each 10 s window of behavior was thus associated with the position (longitude and latitude) of the cow while she was expressing the behavior, based on the date and time of the accelerometer and GPS records. It should be noted that the GPS data were collected every second (1 Hz), therefore there were 10 recorded positions associated to each 10 s window. The longitude and latitude selected for the 10 s window were those corresponding to the mid-point recording within the window. The 10 s windows of behavior combined with the associated geographical coordinates were thereafter referred to as the geolocated behaviors.
Each paddock was split into squares of 8 m × 8 m, hereafter referred to as zones. This surface was chosen to broadly encompass the GPS static position error in the open area (±1.72 m) and to maintain a sufficiently fine description of the paddock. In this way, 576 zones and 841 zones were obtained in the PG and the TG, respectively. The geographical coordinates of each zone were recorded using the data from the French's National Geographic Institute [19]. For every cow and every day of grazing, the longitude and latitude of the geolocated behaviors were used to identify in which 8 m × 8 m zone the cow was during the expression of the behavior, as illustrated in Figure 4a. of behavior was thus associated with the position (longitude and latitude) of the cow while she was expressing the behavior, based on the date and time of the accelerometer and GPS records. It should be noted that the GPS data were collected every second (1 Hz), therefore there were 10 recorded positions associated to each 10 s window. The longitude and latitude selected for the 10 s window were those corresponding to the mid-point recording within the window. The 10 s windows of behavior combined with the associated geographical coordinates were thereafter referred to as the geolocated behaviors. Each paddock was split into squares of 8 m × 8 m, hereafter referred to as zones. This surface was chosen to broadly encompass the GPS static position error in the open area (±1.72 m) and to maintain a sufficiently fine description of the paddock. In this way, 576 zones and 841 zones were obtained in the PG and the TG, respectively. The geographical coordinates of each zone were recorded using the data from the French's National Geographic Institute [19]. For every cow and every day of grazing, the longitude and latitude of the geolocated behaviors were used to identify in which 8 m × 8 m zone the cow was during the expression of the behavior, as illustrated in Figure 4a.  This step was carried out using the R package sp [27]. The time-budgets associated with each behavior were therefore computed in each zone of the pastures for every cow and every day of grazing. The unit of these time-budgets (hereafter referred to as tbu) was thus seconds per area of 8 m × 8 m, per cow and per day. The overall cow location in each zone for every cow and for every day of grazing was the sum of the time-budgets in the corresponding zone.

Characterization of Each Zone in the Pasture
This step aimed to assign pasture characteristics to each area of each pasture. The pasture characteristics were defined by a combination of the structural characteristics, slope, soil moisture and botanical characteristics, as illustrated in Figure 4b. The characterization of zones was performed as follows using the sp package [27]: •

Structural characteristics
As explained in Section 2.1.2, the structural characteristics were geolocated in pastures ( Figure 2a). The geographic coordinates were used to describe the structural characteristics in each zone. As illustrated in Figure 4b, each zone was described in terms of trees (T1, T2 or T3), hedges (H1, . . . , H10) and boundaries (F1 or PA) for the PG and in terms of hedges (H1 or H2) and boundaries (F1, F2, F3, F4 or PA) for the TG. By default, a zone was assigned to none if there was no structural characteristic nearby.
• Slope As presented in Section 2.1.2., the steepest slopes were located in the pastures (Figure 2b). The geographic coordinates were used to assign a moderate slope or steep slope to the corresponding zones, as illustrated in the Figure 4b. By default, the remaining zones were assigned to low slope.

•
Soil moisture Areas with a moist soil were located in the PG as explained in Section 2.1.2. (Figure 2c). As illustrated in Figure 4b, two nonadjacent moist areas were identified in the PG and labelled MS1 and MS2. Otherwise, the zones were characterized as dry by default. •

Botanical characteristics
As explained in Section 2.1.2, plant species were identified in each pasture (97 measures/ha). As the number of different species identified in the pastures was very large (76 and 41 in the PG and TG, respectively), each geolocated measurement was described by a botanical class in a second stage, instead of keeping a rating for every species. For this purpose, a hierarchical ascendant classification (aggregation: Ward criterion) was applied with the R package FactoMiner [28]. Based on the evolution of intraclass inertia over the aggregation process, 8 and 3 classes were identified in the PG and TG, respectively. The botanical classes were then described by the plant species which are the most represented in the class (F-test: v-test > 2) and by the plant species which are the least represented in the class (F-test: v-test < −2). A spatial interpolation (krigeage) of botanical classes was carried out using the R packages gstat [29], rgdal [30] and raster [31] to get a botanical class in each zone of 8 m × 8 m, as illustrated in Figure 4b. The description and geolocation of the botanical classes are provided in Figure 5. Eighty-six and 23 different combinations were obtained in the PG and TG, respectively.

Grouping the Zones and Calculation of the Associated Average Time-budgets
As explained in the previous sections, 576 and 841 zones of 8 m × 8 m were obtained whereas only 86 and 23 different pasture characteristics combinations were identified in the PG and TG, respectively. Consequently, there were many zones characterized by the same combination of pasture characteristics. To reduce this redundancy, we averaged the time-budgets of zones with the same combination, for each cow and for each day of grazing. In this way, we obtained an average time-budget for each of the six behaviors related to each combination of pasture characteristics. The units of these time-budgets (tbu) remained as the seconds per surface unit 8 m × 8 m per cow and per day.

Grouping the Zones and Calculation of the Associated Average Time-budgets
As explained in the previous sections, 576 and 841 zones of 8 m × 8 m were obtained whereas only 86 and 23 different pasture characteristics combinations were identified in the PG and TG, respectively. Consequently, there were many zones characterized by the same combination of pasture characteristics. To reduce this redundancy, we averaged the time-budgets of zones with the same combination, for each cow and for each day of grazing. In this way, we obtained an average time-budget for each of the six behaviors related to each combination of pasture characteristics. The units of these time-budgets (tbu) remained as the seconds per surface unit 8 m × 8 m per cow and per day.

Time-Budget Modeling According to the Pasture Characteristics
This step aims to model the overall cow location, measured as the amount of time spent per cow per day in each of the 8 m × 8 m areas, and time-budgets, measured as the amount of time spent exhibiting each of the 6 predicted behaviors per cow per day in each of the 8 m × 8 m areas, according to the pasture characteristics. Modeling was carried out for the PG and TG, separately.

Consideration of the Correlations between the Pasture Characteristics
The lack of independence between some pasture characteristics (e.g., some plant species often found together in the same area) could have biased the interpretation of the linear model results. For this reason, we grouped together characteristics within structural elements, slopes or botanical classes which were highly correlated to reduce the main correlation before applying the linear models. For this, a multiple correspondence analysis was first applied followed by an agglomerative hierarchical clustering (AHC) (aggregation: Ward criterion) using the R package FactoMiner [29]. We identified the most correlated characteristics as those being the most represented within the same cluster (Chi square test: v-test > 2). The groupings carried out are presented in Table 1. Note: All notations referred to Figure 2. Grouped characteristics appear in orange; the reference level for each characteristic is in italic.
Subsequent work was carried out to reduce the correlation between the different types of pasture characteristics, such as the correlation between H2 and MS1 (Figure 2a,c). Details of the method used to reduce such correlations are provided in Appendix A (Table A2). The grouping of the pasture characteristics presented in Table 1 remained unchanged.

Modeling with a Linear Mixed Model with an Analysis of Variance
The effects of the pasture characteristics on the overall cow location and time-budgets were evaluated using 7 different linear mixed models. The reference levels chosen for each characteristic after grouping are presented in Table 1. The two initial models are described in Equations (1) and (2) for the PG and TG, respectively: where the outcome y ijklmnop and y ijklmn was either the overall cow location (the total time in seconds spent per cow per day in each of the 8 m × 8 m areas) or the time-budget (the time in seconds spent expressing each of the 6 predicted behaviors per cow per day in each of the 8 m × 8 m areas) for the PG and TG, respectively; µ was the overall mean; C i was the cow random effects; D j was the fixed effect of the day of grazing; H l and H k were the fixed effect of hedges for the PG and TG, respectively; B m and B l were the fixed effect of the boundaries for the PG and TG, respectively; BC p and BC n were the fixed effect of the botanical classes for the PG and TG, respectively; T k was the fixed effect of the trees in the PG; MS o was the fixed effect of the soil moisture in the PG and e ijklmnop and e ijklmn were the random residual effects for the PG and TG, respectively. The model parameters were estimated using the R lme4 package [32]. A backward procedure was adopted to get the final model with only significant parameters. An ANOVA of type III was carried out with the R package car [33]. A Tukey test was finally applied to each explanatory parameter to identify the levels which were significantly different from each other. The Tukey test was carried out with the R package emmeans [34].

Average Time-Budget of Every Behavior in the Pasture
The dairy cows spent most of their time grazing, representing 56.2% and 71.3% of the time spent in the PG and TG, respectively. The cows also devoted a considerable part of their time to ruminate in lying position (15.9% and 12.1% in the PG and TG, respectively). The rest time in the lying position was about twice as frequent in the PG (13.3%) than in the TG (6.4%). Other behaviors were sparsely represented, leading to a percentage below 6% for both the PG and TG.

Effect of Each Pasture Characteristic on the Behaviour of Dairy Cows
The ANOVA results associated with the final models and the adjusted means obtained with the Tukey test for the pasture characteristics in the PG and TG are presented in Tables 2 and 3, respectively. The ANOVA results associated to the day of the pasture fixed effect are reported in Appendix A (Table A3). The estimates associated to each significant effect in the PG and TG are provided in Appendix A (Tables A4 and A5). Each effect is reported using the following order: the value of the time-budget (time-budget unit (tbu)-seconds per surface unit of 8 m × 8 m, per cow and per day); the decrease or increase factor of the time-budget associated to the effect in comparison with the basis time-budget, i.e., without any effects (intercept); the significance level associated to the effect.

O Ruminating time
Only trees were significant regarding the time spent ruminating while lying (p < 0.001; Table 2). The dairy cows spent substantially more time ruminating in lying position close to "T2" (25.8 tbu; +236; p < 0.001). Similarly, only trees significantly affected the time spent ruminating in standing position (p < 0.001; Table 2.). The dairy cows spent substantially more time ruminating in standing position also close to "T2" (3.4 tbu; +18.15; p < 0.001).

O Walking time
Botanical classes had a significant effect on the walking time (p < 0.05; Table 3). As for the grazing behavior, cows spent more time walking in botanical "Class_3" (0.93 tbu; +1.06; p < 0.01).

O Ruminating time
Only botanical classes significantly affected the time spent ruminating in the lying position (p < 0.05; Table 3) with more rumination while lying in botanical "Class_3" areas (1.63 tbu; +10.2; p < 0.01). The time spent ruminating in the standing position was significantly impacted by the boundaries (p < 0.001; Table 3). The cows spent more time ruminating while standing close to "F4" (1.70 tbu; +5.24; p < 0.001).

O Resting time
No pasture characteristic affected the time spent resting while lying ( Table 3). The time spent resting while standing was significantly affected by the boundaries (p < 0.01; Table 3). The cows spent more time resting while standing close to "F4" (2.2 tbu; +3.10; p < 0.001).

Different Organization of the Dairy Cow Behavior in the Two Pastures
During the 5 days of grazing, the dairy cows grazed the permanent pasture in the morning and the temporary grassland in the afternoon. The PG involved many natural structural elements, moist areas and a large diversity of plant species dispersed in the field. Conversely, the TG was limited to two hedges and was essentially composed of some major plant species, including ray-grass, bluegrass and brome. The TG was also directly next to the AMS and was directly adjacent to the heifers. A different organization of behaviors of dairy cows was found in these two pastures. A strong organization was observed in the PG around the main pasture characteristics, reflected by some preferred or rejected areas. The dairy cows spent more time under trees, whatever the behavior. They spent more time to graze in the "MS2" area and in the botanical "Class_3" areas, which are mainly constituted by Holcus lanatus and Cerastium species ( Figure 5). In contrast, the "MS1" area was under-visited by dairy cows. The behavior was therefore very structured around the pasture characteristics in this diverse pasture. Conversely, the organization of the dairy cows in the TG was less pronounced. The cows spent more time in the botanical "Class_3" areas (Sisymbrium officinale and Avena fatua; Figure 5) which were in the AMS access route and close to the fence "F4" which enabled the proximity, sight and socialization with heifers in the neighboring field. Therefore, their behavior seems more influenced by the external environment than by the pasture characteristics themselves in this temporary pasture.
The study protocol involving only two pastures on a single farm for 5 days prevents us from drawing general conclusions on the determinants of the behavior of dairy cows on pasture. However, the organization found under these specific grazing conditions can easily be interpreted in light of the literature. This suggests that, used in contrasted situations chosen on the basis of specific research hypotheses, this approach is promising to explore continuously and automatically the interactions between ruminants and their environment. In the PG, the attractiveness of the trees was similar to the study of Schütz et al. [35], where a high motivation to use shade was reported. It should be noted that the favored tree, "T2", was the largest tree, providing a large shaded area. This result was also in agreement with Schütz et al. [35] in which cows spent more time in areas with the greatest shade. In this latter study, lying was also observed more frequently in shaded areas than in other places. In our study, the time spent grazing was more important in areas close to trees, as already reported in the literature [36]. The dairy cows spent more time grazing in the "MS2" area, which was located near a natural source of water. As there was no drinking trough in the paddock, the cows may spend more time grazing in "MS2" because of the proximity to the water source. On the contrary, the cows rejected "MS1" although it was a fresh area, probably because they have never suffered from the heat due to the moderate temperatures [17]. The cows also spent more time grazing in botanical "Class_3" areas, which were mainly constituted by the Holcus lanatus and Cerastium species. This finding corroborates those of O'Donnell and Walton [37], in which free-ranging cattle in an Irish hill-farm spent 81% of their time grazing in spots with Holcus lanatus. This comparison should however be more nuanced as the other botanical species in the pasture were different from those of our study. In contrast, the botanical "Class_5", characterized by a high proportion of Lolium perenne, which typically has a higher digestibility and preference than Holcus lanatus, was significantly less grazed by cows. However, Rutter et al. [38] also showed that dairy cows preferentially eat a mixed diet. As Lolium perenne was very abundant in the temporary grassland, it is possible that cows grazed other species preferentially in the PG. Finally, it should be mentioned that Lolium perenne was not an over-represented species of the botanical "Class_3", but it still represented 23% of the species in this botanical class (data not shown). In the TG, cows spent more time in the botanical "Class_3" areas while the corresponding vegetation (Sisymbrium officinale and Avena fatua) is a priori not palatable. This effect is maybe skewed as this botanical class was largely under-represented in the paddock unlike the other two. Furthermore, even if no effect was found for the boundaries close to the AMS ("Bnd_AMS"), the "Class_3" areas were located in the path access of the AMS. The cows may spend more time in these areas simply because of the regular journeys to and from the AMS. This hypothesis also helps to explain why more walking was achieved in these areas. The dairy cows spent more time standing close to the fence "F4" which was directly next to heifers, consistent with the widely reported social and gregarious nature of cattle [39]. Hedges constituted the only shaded areas in the TG, but they were not used by the dairy cows, contrary to what we expected [35]. However, Schütz et al. [35] mentioned that shaded areas are mainly used for resting behaviors, both in standing and lying postures. Therefore, the under-use of the hedges in the TG should be nuanced as the resting behaviors were under-represented in the TG during the afternoon (10.1% of the time corresponding to 19.8 min of resting on average per cow and per day). Moreover, the results obtained during the night on the same paddock highlight a substantial use of hedges for resting behaviors (data not shown). The consistency of the findings obtained by studies on the behavior of dairy cows on pasture thus highlights the potential to combine the predicted behaviors from accelerometer data with positions from GPS data to explore continuously and automatically the resource use by dairy cows at grazing.

Potential of Geolocated Behaviours to Improve Precision Grazing and Animal Health and Welfare
The monitoring of geolocated cow behavior could be used to identify over-grazed locations and then force cows to avoid these areas, as suggested by Laca et al. [40]. As illustrated in this study, dairy cows prefer to graze in specific locations both in heterogeneous [41] and in sown grasslands [42], which may result in a loss of quality forage to less nutritious vegetation in these over-used areas. Adapting pasture management to the use of the resources by the cows could help to prevent an increase in the feeding costs and a decrease in the milk yield related to a depletion of quality forage. Thus, our approach seems particularly relevant in the case of extensive grazing to identify the preferred grazing and resting sites based on grazing management, topography or season, as studied by Feldt and Schlecht [43].
Our approach could also be used at the individual level to identify the areas specifically used by each animal and then assess the risk of being affected by certain diseases. For example, the density of the tick Ixodes ricinus transmitting Babesia divergens is higher in deep hedges [4]. The habitats of the intermediate host snails of Fasciola hepatica, responsible for fasciolosis in cattle, are located near water bodies and in soils with poor drainage capacity [5]. Therefore, a fine knowledge of the areas used by each cow would allow a targeted use of drug treatments by treating only animals at risk.
Identifying the over-visited areas could also decrease the environmental impact at the farm level. Over-frequentation may lead to important amounts of dung on small areas, resulting in a localized release of nitrogen into the soil. A fine knowledge of these spots using our approach could be relevant to adapt fertilization practices.
Geolocated behaviors are also promising to investigate changes in behavior related to challenging situations [7], including heat stress, physical stress, resource depletion, restricted access to pasture, etc. We were not able to explore such changes in our study because no challenging situations were recorded during the 5 days of experimentation (thermoneutrality, liberal grazing system, etc.), but our methodological framework can be used to explore the changes in both feeding behaviors [44]-static [45] and dynamic [46]-under different stressful situations. Finally, time-budgets were computed in our study but other indicators can be calculated from the predicted behaviors, such as the number of bouts and their average duration. Combined with GPS data, our approach can thus lead to several innovative patterns of behavior, such as the travelled distance during grazing, the duration before lying from the moment of entrance in the paddock, the number of times the areas are visited for grazing as part of the rotation, the resting time close to drinking though and paddock access, etc. The proposed approach therefore offers a range of new behavioral indicators to explore in challenging situations. Such indicators could then be integrated into tools for welfare monitoring.

Current Technical Limitations
The approach developed in this study has some technical limitations. Currently, the data are stored on a secure digital card and require a manual extraction. An automatic transfer of data would be more convenient for a long-term experiment. The battery life remains the main technical challenge. The battery life of our sensors was only 5 days, which is not enough to explore the relationship between cows and their environment, especially in pastoralism where cows graze continuously over a long period of time. As both the sampling rates of the accelerometer (59.5 Hz) and GPS (1 Hz) sensors are very high, further work is needed to (1) reduce the sampling rate of the accelerometer sensors without decreasing the performance of behavior prediction and to (2) adapt the sampling rate of the GPS sensors to get the desired spatial scale for every application. Another way to deal with this problem is to use solar energy to recharge the battery, as has recently been proposed for virtual fences [47]. Given the potential of the approach developed for research on cattle behavior at grazing, this engineering effort is really worthwhile to make the tool operational for experimental farms.

Conclusions
The geolocated behavior predicted from the accelerometer and GPS data is a promising way of studying the interactions between cows and their environment. The geolocated behaviors were related to the pasture characteristics, including the vegetation, trees, hedges, soil moisture or external elements of the pasture. In the permanent grassland, the dairy cows spent more time grazing, resting and ruminating near a tree and more time grazing close to a source of water. In the temporary grassland, the behavior of the cows was more influenced by the external environment, such as the presence of heifers or the proximity of the AMS. These findings could be easily related to the literature on dairy cow behavior, suggesting that this approach is promising to explore behaviors in relation to the environment and pasture conditions. Although there are still technical limitations, our approach constitutes a promising way to investigate animal-environment interactions in order to develop precision grazing and improve animal health and welfare. Funding: This study was funded by Terrena Innovation (Ancenis, France), the region of Pays-de-la-Loire (France) and the National Association of Research and Technologies.

Acknowledgments:
We thank the commercial farm GAEC Haute-Roue (La Pommeraye, Nantes) where the experiment took place. We also thank Jacques Magnier for their assistance in data collection.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:   Some different types of pasture characteristics were correlated as H2 and MS1 (Figure 2a,c). All the pasture characteristics concerned by such correlations were also identified using the clusters of the AHC (Section 2.3.1). The correlations between the different types of pasture characteristics led to a repetition of the same information within the same row of the dataset and thus to a potential misinterpretation of the effect of these pasture characteristics. As grouping these characteristics (Table 1) was not possible, we condensed the information on a single characteristic for the entire combination. The characteristics highly correlated within the same combination were either kept to represent the substantial information within the combination, or substituted by the reference level. In this way, the combination of pasture characteristics was summarized by a single characteristic representative of the combination. If the dairy cows spent more time in these zones, then the effect of the characteristic representative of the combination will be significant. However, this process of re-assignment should obviously be considered for the model interpretation. Three and four combinations were concerned in the PG and TG, respectively. The applied re-assignments for these particular combinations are presented in Table A2. Sign. ** *** **  Est. ± se 6.8 ± 2.9 4.0 ± 1.8 0.5 ± 0.2 1.5 ± 0.6