Introduction

Animal behaviour emerges as a result of interactions between the individual and their environment [1]. Changes in behaviour allow an animal to exploit resources and avoid threats, ultimately playing a large role in determining individual fitness and the long-term success of populations and species [2, 3]. Quantifying behaviour can give early warning signs of environmental change, both natural and anthropogenic, which may eventually impact population dynamics [4,5,6]. Understanding behaviour is therefore critical both for conservation and for monitoring the health and welfare of animals [7,8,9].

Studying the behaviour of free-ranging animals presents multiple challenges [10, 11]. Quantitative assessments of behaviour to determine trends and responses to external factors often require the observation of relatively large numbers of individuals for long periods of time [12]. In the wild, species may be difficult to find and track [13, 14]. Additionally, the presence of an observer can alter animal behaviour [10, 15, 16]. As a result, fine-scale wild animal behaviour has been understudied relative to more accessible captive animal models [17]. Increasingly, remote sensing methods, such as unmanned aerial vehicles (UAVs/drones), and static camera traps are employed in wildlife monitoring [18,19,20,21]. While these technologies present new opportunities for studying wild animal behaviour, they are limited to accessible animals and often ill-suited for consistent monitoring over longer time scales, such as detecting seasonal variation in fine-scale behavioural patterns.

Animal-borne bio-logging devices (bio-loggers) overcome many of the challenges associated with monitoring animal behaviour both in the wild and in captivity [10, 17]. These devices are attached to the animal and record data which is either transmitted or collected when the device is retrieved [22]. Accelerometer loggers (hereafter referred to as ‘accelerometers’) are a promising type of biologger, increasingly used in the study of animal behaviour [10]. Tri-axial accelerometers measure the rate of change in velocity on three axes (X, Y and Z). Different behaviours result in unique patterns of three-dimensional acceleration, enabling them to be interpreted from accelerometer readouts [22]. Accelerometer data are suitable for automated processing using ‘data hungry’ methods due to their high temporal resolution [23,24,25]. Accelerometers are increasingly light and affordable, enabling their deployment for extended periods of time to capture biological and ecologically significant events which cannot be monitored through traditional methods [10, 24].

Despite the widespread incorporation of animal-borne devices into monitoring programmes, there remain several questions which should be answered to ensure effective and ethical data collection [10, 26, 27]. When conducting animal research, it is the ethical obligation of the researcher to maximise the efficiency of devices and minimise the impact on individuals [25]. Many studies using accelerometers have presented little justification of the choice of sampling frequency, window length (the smallest unit of time over which behavioural data are analysed), device placement, or attachment type [10, 26]. Selecting an appropriate sampling frequency requires a trade-off between data resolution and internal storage capacity, which in turn determines how often animals are handled [13, 28]. Device placement and attachment type should be optimised to ensure there is minimal interference with the animal’s range of motion and welfare [27]. For accelerometers, device position also influences how well behaviours can be determined based on readouts [29,30,31]. For each animal model, calibration and standardisation should be conducted [31].

All species of pangolin are currently considered vulnerable to extinction [32]. One of the main threats to this clade is poaching and trafficking for bushmeat and use in traditional medicine [33,34,35]. As a result, seizure of live pangolins by authorities is common, and subsequent rehabilitation and release is an important aspect of conservation [36]. How well released individuals reintegrate into wild populations is not currently known, with existing monitoring programmes relying on coarse positional data from satellite tags [37, 38]. Using accelerometers to quantify the behaviour of free-ranging pangolins would present opportunities to improve existing release protocols.

In this study, we present standardised protocols for the use of accelerometers to study the behaviour of African ground pangolins (Smutsia temminckii). We present a standardised position and attachment type to minimise device impact on behaviour and welfare. Through calibration using ethograms, we develop automated classifiers to determine pangolin behaviour and activity level based on accelerometer readouts. We then use accelerometers to quantify the behaviour of free-ranging pangolins. Moving forward, this work can be applied immediately to the study of African ground pangolins and developed further to incorporate more pangolin species.

Methods

Ground pangolin individuals

Ground pangolins recovered from trafficking in Zimbabwe undergo rehabilitation with the Tikki Hywood Foundation prior to release [38]. Device attachment protocols and validation of interpretation of accelerometer readouts were carried out by attaching devices to five healthy individuals in care (Harare, Zimbabwe) and one free-ranging individual post-release (Gonarezhou National Park, Zimbabwe). Following validation, devices were attached to three free-ranging post-release individuals (Gonarezhou National Park, Zimbabwe, Table 1). These individuals were not under observation between device attachment and retrieval. One of the individuals (Shura) was used for both validation and unobserved free-ranging deployment.

Table 1 Ground pangolins to which accelerometers were attached

Device design, positioning, and attachment

Ground pangolin scales present many possible attachment sites for bio-loggers. Previous work has indicated that (i) devices should be attached at a single point along the midline so as not to interfere with natural behaviours; (ii) devices should be dull and dark in colour, with no exposed lights; (iii) devices should break off if they become entangled or during a predator attack; and (iv) devices should be equivalent to no more than 3% of the animals body mass [27, 38]. For measuring fine-scale behaviour, accelerometers are generally advised to be attached in a manner that leaves them rigid and fixed in place. This ensures that the dimensions of movements remain constant throughout deployment [10, 39]. Such an attachment would have interfered with the manoeuvrability of pangolins and was deemed inappropriate for the current study.

An attachment site was selected on the first central dorsal scale caudally from the pelvis (Fig. 1a, b). Seven mm holes were drilled through distal portion of scales. AxyTrek accelerometers (TechnoSmart, EU) were mounted on flexible cattle ear tags (length: 9.8 cm, width: 4.2 cm), enabling removal in the event of predator attack or entanglement (Fig. 1b). Initial validation was carried out using orange tags. These were replaced with black tags for free-ranging pangolins (Additional file 2: Fig. S1). Tags were secured at a single point using a six mm bolt with a sleeve threaded through the ventral side and secured with a nut on the dorsal side of the scale (Fig. 1c). The total mass of the device, tag, and bolt was 46 g (< 3% the mass of any pangolins used in this study, Table 1).

Fig. 1
figure 1

a Accelerometers were attached to the first central dorsal scale caudally from the pelvis. This enabled a full range of natural behaviours. b AxyTrek accelerometers (TechnoSmart, EU) were mounted on flexible cattle ear tags (seen here dissembled next to a pangolin scale). c Tags were secured at a single point using a 6-mm bolt with a sleeve threaded through the ventral side and secured with a nut on the dorsal side of the scale. Orange ear tags were used for validation of methods on pangolins in care. Black ear tags were used for deployments on free-ranging pangolins (Additional file 2: Fig. S1)

Data collection

Accelerometers were configured to record 50 Hz data, with a dynamic range of ± 8 g (G fullscale) and an 8-bit resolution. During validation, pangolin behaviour was recorded using a GoPro Hero 11, with GoPro labs Precision Date and Time (UTC). For pangolins in care, this was done during daily foraging walks. During walks, pangolins were given free range to forage for food while under supervision of a handler. Pangolins explored varied terrain, with the handler intervening only to redirect the pangolin. The one free-ranging pangolin included in the validation stage (Shura, Table 1) was opportunistically fit with an accelerometer and filmed while foraging. To enable synchronisation of annotated behaviours and accelerometer readouts, the start and end times of videos were synchronised to UTC by recording the time on a GPS app (GPS test, Chartcross Limited) [40]. Footage of the app was recorded for a minimum of five seconds at the start and end of each filming session.

To include time spent sleeping, which generally occurs in dens in the wild, three pangolins in care (Dakari, Impi, and Yakachena, Table 1) were fit with accelerometers while resting in sleeping boxes (length = 55 cm, width = 55 cm, Height = 60 cm). In boxes, pangolins are mostly stationary, with a handler remaining in the room and noting any audible movements.

Behavioural classification

Behaviours were grouped into i) seven discrete behaviours and ii) three activity levels (Additional file 1: Materials 1, Table 2). Based on videos, a single observer generated an ethogram (Table 2). The exact time each behaviour started and finished was recorded. Any direct interactions between handlers and pangolins (e.g., redirecting or picking them up) were removed from analysis. A total of 13,824.43 s of video footage were annotated. Eight minutes spent in the sleeping box for each of three individuals were labelled as “stationary”. Head tucking (a defensive response to being startled) was excluded due to its short duration (< 2 s). “Rolling” was excluded as it was only recorded in one individual. Based on ethograms, accelerometer readouts were labelled with behaviours and activity levels. To account for the risk of time synchronisation errors, the first and last seconds of each behaviour were omitted [40].

Table 2 Based on video analysis, behaviours were grouped into discrete behaviours and activity levels

To optimise window length (the smallest unit of time for which behaviour is analysed), each segment of labelled behaviour in accelerometer readouts was split into equal blocks between one and eight seconds in length. As this was performed within each behaviour, no overlap of behaviour occurred within segments. For each of these window lengths, optimal sampling frequency was determined by resampling the original 50 Hz data to generate 25, 12, 10, 8, 4 and 2 Hz datasets [28, 40]. Following Collins et al [26], 18 summary metrics were calculated for each block (Additional file 2: Table S1) using adapted code from Clark [ [41] and Clark et al [42].

Random forest classification

Random forest (RF) classification was used to automatically classify behaviours. Separate RF models were developed to classify each dataset (split based on window length and sampling frequency) into detailed behaviours and activity levels (Table 2). Between the six pangolins, a total of 10,685 s of behaviour (“Digging” = 1140 s, “Walking” = 4338 s, “Feeding” = 2358 s, “Investigating ground” = 949 s, “Stationary” = 1900 s) were labelled for use in training and testing of the RF model (Additional file 2: Table S2).

Each dataset was randomly split into training (70%) and a testing (30%) datasets. RF models were fit to the training data [43]. Tuning parameters were set using the trainControl() function in the R-package caret. To account for repeated measures (i.e. multiple observations of each behaviour per pangolin), individual based tenfold cross validation was used, resulting in labelled data from individual pangolins being kept together in individual folds during splitting of training data [43, 44]. Due to the unequal behavioural group sizes (e.g., 50 Hz five-second window length; “Digging”: 186 segments, “Walking”: 811 segments, “Feeding”: 426 segments, “investigating ground”: 136 segments, “stationary”: 368 segments), up-sampling was conducted. A grid search was used to optimise tuning parameters.

During fitting of the RF, the minimum node size was set to one, the importance of covariates to classification was calculated based on Gini index and the number of potential covariates to use at each split ranged between one and 18. The model was run for 1000 iterations. Area under the receiver operating curve (AUC), a measure of performance for classification problems, was calculated during model tuning and performance evaluation.

To evaluate performance, RF models were applied to testing datasets [28]. A confusion matrix was produced, using the confusionMatrix() function in the R-package caret, and model accuracies were calculated [45]. Optimal sampling frequency and window lengths were selected based on highest accuracy. For optimal RF models, the relative importance of summary metrics (Additional file 2: Table S1) to accuracy and predictive ability were determined based on the impurity variable importance mode [46]. Accelerometer readouts from three free-ranging pangolins were classified into discrete behaviours and activity levels using RF models for optimal parameters.

Software

Video analysis and ethogram generation was carried out in BORIS [47]. Subsequent data processing and visualisation was conducted in R version 4.3.2 [48] with data organisation assisted by the dplyr, data.table, lubridate, zoo, and tidyverse packages and data visualisation using the ggplot2 package [49,50,51,52,53,54]. RF fitting and evaluation was carried out using the caret [55] and ranger [46] packages.

All data, including annotated datasets, and code are available on GitHub https://github.com/JessHCarroll/Pangolin_Accelerometer_Analysis and archived on Zenodo https://doi.org/10.5281/zenodo.11179372.

Results

Optimal sampling frequency and window length

The highest overall accuracy of RF classifications for discrete behaviours (accuracy = 85%, upper = 87%, lower = 81%, κ (Kappa coefficient) = 0.78) occurred with a window length of five seconds and a sampling frequency of 50 Hz (Fig. 2a, Additional file 2: Table S3). The highest overall accuracy for activity levels (94%, upper = 96%, lower = 91%, κ = 0.85) occurred with a window length of seven seconds and a sampling frequency of 10 Hz (Fig. 2B, Additional file 2: Table S4).

Fig. 2
figure 2

The accuracy of random forest (RF) models for classifying pangolin behaviour based on accelerometer readouts across sampling frequency (Hz) and window length (seconds) for a discrete behaviours and b activity levels

For both groupings, maximum heave was the most important predictor for classifying behaviours, closely followed by mean heave for activity levels (Fig. 3).

Fig. 3
figure 3

The relative importance of the 18 summary metrics (Additional file 2: Table S1) used to fit random forest (RF) classification models for a discrete behaviours and b activity levels. Larger values indicate that metrics contributed more to the overall accuracy or predictive ability of the model. SD, standard deviation; Min., minimum; Max., maximum; ODBA, overall dynamic body acceleration; VeDBA, vectorial dynamic body acceleration

Changes in sampling frequency had variable effects on the accuracy of predicting individual behaviours. For example, changes in sampling frequency had little effect on the accuracy of predicting the “Stationary”, “Walking”, and “Feeding” behaviours, while the accuracy of “Digging” and “Investigating ground” declined sharply between 50 and 25 Hz (Additional file 2: Fig. S2a, Table S3). Similarly, the accuracy of predicting the “Low” activity level remained relatively constant across sampling frequencies, while there was a sharp reduction in accuracy between 25 and 12 Hz for “High” activity levels (Additional file 2: Fig. S2b, Table S4).

Classification of behaviour for free-ranging pangolins

The behaviour of three free-ranging pangolins was classified based on accelerometer readouts into discrete behaviours, using a sampling frequency of 50 Hz and window length of five seconds (Fig. 4), and activity levels, using a sampling frequency of 10 Hz and window length of seven seconds (Additional file 2: Fig. S3).

Fig. 4
figure 4

The classification of free-ranging pangolin behaviour into discrete behaviours based on accelerometer readouts (sampling frequency = 50 Hz, window length = 5 s). These pangolins were not under observation outside of device attachment and retrieval. Grey shaded areas represent night. White areas represent day

Discussion

We have presented a validation of the use of accelerometers to quantify the behaviour and activity level of ground pangolins and presented the first detailed record of the behaviour of free-ranging pangolins across multiple days. In future studies, we recommend the use of an optimal sampling frequency of 50 Hz and window length of five seconds if quantifying discrete behaviours and a sampling frequency of 10 Hz and window length of seven seconds if quantifying activity levels. For longer deployments when device storage is an issue, reasonable accuracy can also be achieved with sampling frequencies between six and 50 Hz. The level of accuracy achieved by random forest (RF) classifiers were comparable to other studies of this kind (e.g., an accuracy of 86.96% for adult hawksbill turtle (Eretmochelys imbricata), 79.49% for green turtle (Chelonia mydas) [56], 82% for moose (Alces alces) [57] and 87% for dingo (Canis dingo) [58]). Our validation dataset included a range of pangolin sizes. While we acknowledge a bias towards males, we believe our results are generalisable to individuals of both sexes outside the study.

Animal-borne accelerometers are generally attached in a manner which ensures that devices are fixed in place (e.g., using adhesives or harnesses) [10, 39]. Given the size of pangolin scales relative to devices, it was not possible to attach them in a rigid manner while enabling the animal to carry out a full range of natural behaviours. Instead, flexible single point attachments were used which likely amplified device movement. We have demonstrated that such an attachment can result in classification of fine-scale behaviour with high levels of accuracy. As these protocols were selected while considering the individual welfare of animals, they are suitable for integration into ongoing post-release monitoring programmes.

Accelerometers attached to the back of an animal were previously suggested to be incapable of accurate classification of fine-scale feeding behaviours [10]. We did not find this to be the case for pangolins, with high levels of accuracy (88%) when classifying “Feeding”. This is likely since pangolins are ant and termite eaters which employ specific global body poses and motions during feeding and may be true for other species with a similar diet.

We have shown that a window length of five seconds is appropriate to capture all but the most rapid of pangolin behaviours. A five-second widow length has been recommended for other species such as reindeer (Rangifer tarandus) and sheep (Ovis aries) [59, 60]. Increasing window length size is generally accepted to increase the accuracy of detecting complex behaviours, at a cost of increasing the likelihood of capturing transitions between behaviours, resulting in misclassification [59, 61]. If rapid behaviours are of interest to future studies, the window length could also be decreased, although this would reduce overall accuracy.

Generally, higher accelerometer sampling frequencies result in higher accuracy for behavioural classification, although this depends on the behaviour of interest [28, 40, 61,62,63]. Higher sampling rates consume battery power and memory storage more quickly. Therefore, researchers should carefully consider these trade-offs during device deployment [28, 61, 63]. For ground pangolin, we have shown that the highest sampling frequency (50 Hz) gave the highest levels of accuracy for discrete behaviours, however the highest levels of accuracy for activity levels were obtained at a lower frequency (10 Hz). In future, considerations should be given to the study question, which may not require full quantification of discrete behaviour.

A common limitation in the classification of accelerometer readouts is distinguishing behaviours which occur at the same time, e.g., eating and walking [64]. This was not found to be an issue with pangolins as behaviours of interest did not occur concurrently. Although important discrete behaviours could be classified, pangolins in the wild carry out other behaviours of interest to research, such as mating, responding to predators, and interacting with conspecifics, which could not ethically be simulated for pangolins in care. This is similar to other studies which classify behaviour based on accelerometer readouts [65]. Among observed behaviours, “Head tucking” could not be included in analysis as it occurred faster than the behavioural segments of three seconds used to control for time synchronisation errors. Additionally, “Rolling” was only observed in one individual and could not be included in analysis. Increasing observation time in future work could therefore increase the number of detectable behaviours. Nonetheless, this work is the first of its kind for any pangolin species and promises to open new opportunities to study pangolin behaviour in their natural habitat. The methods used could easily be applied to other species of pangolin to validate the use of accelerometers for quantifying behaviour.

As part of this study, accelerometers were deployed on free-ranging pangolins for between two and four days. This was intended as a proof-of-concept with the relatively short period being selected so that data could be analysed immediately following the validation of behavioural classification methods. The accelerometers used in this study can collect approximately one month of continuous data from a single deployment and are rechargeable, making longer-term monitoring possible in future work.

Despite their relatively short duration, deployments of accelerometers revealed seemingly rhythmic daily behaviour for each of the three individuals with considerable differences in peak activity times between them. Shura displayed nocturnal behaviour while Fikile and Makwande displayed crepuscular behaviour. Both Shura and Makwande also displayed short bouts of activity during the day, which, to our knowledge, has not previously been observed for ground pangolin. The overall range in behavioural peaks supports previous work which found that, within the same population, different ground pangolins display nocturnal, diurnal, and crepuscular behaviour [66,67,68,69]. Previous research has suggested that peak burrow emergence time by ground pangolins in the Kalahari is influenced by prey availability and temperature [66, 70]. As the individuals in our study were exposed to broadly similar environmental conditions, our findings highlight the importance of individual variability in behaviour. Generally, free-ranging pangolins were observed to spend a large amount of their time stationary (between 62 and 71%), supporting previous findings [69]. Future work should focus on extending this dataset to include more individuals to explore the influence of environmental factors on pangolin behaviour.

Introducing new individuals into ecosystems has the potential to increase intraspecific competition, for example for food, mates, or suitable denning sites, negatively impacting the welfare of both released and wild animals [71, 72]. Behavioural changes, which can now be tracked for ground pangolins using accelerometers, could give indications of increased competition. The use of accelerometers to quantify the behaviour of ground pangolins during the transition from care to free ranging could therefore allow guidelines on the number of individuals which can be introduced into a population to be developed.

During rehabilitation and release as well as relocation and reintroduction programmes, understanding species’ habitat usage can increase the chance of survival and integration into established wild populations [73, 74]. The definition of a species’ optimal habitat is challenging given the range of complex factors involved as well as the plasticity of both physiology and behaviour within species [75,76,77,78]. The quantification of individual behaviour, now possible on a larger scale than ever before thanks to the development of tools such as accelerometers, will inform on key metrics of animal welfare, such as daily activity rates or the time allocated to activities such as foraging. Quantifying metrics such as foraging effort can directly inform on habitat usage when combined with GPS location, allowing the definition of individual ranges and thus the suitability of certain sites for protection or the release of animals to be assessed. Daily activity can also be integrated into energy budgets, ultimately building into population-level models to inform on population viability [79,80,81,82].

Conclusion

We have validated the use of accelerometers to quantify the behaviour of ground pangolins. The protocols for device attachment and validation of behavioural classification we have developed can be applied to other pangolin species in future. This work presents a new tool for the study of pangolin behaviour which promises to provide valuable information for the design of conservation strategies for this and other vulnerable species. It can also be used to improve our fundamental understanding of the interaction between animals and their environment, ultimately gaining new insights into animal ecology, evolution, and how best to protect the natural world. We have found support for established views of pangolin behaviour, namely the fact that there is variation in the timing of peak activity between individuals in the same habitat and that they spend the majority of their time at rest. Further work should expand upon this to explore the influence of environmental factors on pangolin behaviour for more individuals across longer time scales.