Data from: Roost switching and behavioural shifts following human disturbance of vampire bats in complex landscapes
Data files
Aug 12, 2026 version files 6.29 GB
-
Data_and_scripts.zip
6.29 GB
-
README.md
21.69 KB
Abstract
Rabies transmitted by common vampire bats (Desmodus rotundus) remains an important threat to livestock and human health across Latin America. Understanding how bats respond to direct human disturbance is particularly relevant because management actions targeting vampire bats may alter their movement behaviour and, therefore, influence pathogen spread. This dataset was generated from a GPS tracking study conducted in the Peruvian Andes during 2022-2023, in which 93 vampire bats were captured, tagged and monitored to investigate post-disturbance movement behaviour. GPS tracking data were processed using a Bayesian state-space modelling framework that accounted for incomplete observations and GPS error. The repository also includes data from a long-term vampire bat monitoring programme conducted between 2007 and 2019, which was used to assess body mass variation in vampire bats and potential effects associated with GPS tag deployment. In addition to the tracking and capture records, the repository contains environmental covariates, processed datasets, and analytical code required to reproduce the study workflow and analyses.
Dataset DOI: 10.5061/dryad.7wm37pw53
Description of the data and file structure
The Data_and_scripts.zip contains all the data and code associated with the manuscript *“Roost switching and behavioural shifts following human disturbance of vampire bats in complex landscapes”, published in Scientific Reports. * The study aimed to investigate the effects of direct human disturbance (i.e., capture, handling, and tagging) on bat movement to inform vampire bat rabies management. Due to sparse GPS data resulting from complex mountainous terrain with limited satellite visibility, we developed a Bayesian state-space model to estimate individual movement metrics (i.e., times and distances from the roost), estimate maximum travel distances, and infer vampire bat behavioural responses to direct disturbance. Between 2022 and 2023, we tagged 93 vampire bats for up to 9 nights.
File list (files found within Data and scripts.zip) and descriptions
Obs240422_213522_Tag47093.xls
This file contains GPS location data collected from a fixed GPS tag deployed for testing purposes to estimate GPS positional error within the study area. GPS fixes were programmed at 5-minute intervals. Each row represents a GPS fix recorded by the device.
This file contains the following information:
- Day indicates the day of the month (discrete numeric variable; unit: day).
- Month indicates the month of the year (discrete numeric variable; unit: month).
- Year indicates the calendar year (discrete numeric variable; format: YYYY).
- Hour, Minute, and Second indicate the time of the GPS fix (24-hour format; values 0-23, 0-59, and 0-59, respectively; discrete numeric variables).
- N satellites indicates the number of visible GPS satellites (discrete numeric variable; unit: count).
- Lat and Long are the latitude and longitude coordinates of the GPS fix (continuous numeric variables; unit: decimal degrees; coordinate reference system: WGS84).
- Altitude is the elevation of the GPS location above sea level (unit: metres, m).
- Lat1 and Long2 are the latitude and longitude coordinates of the fixed GPS tag location used as a reference position (continuous numeric variables; unit: decimal degrees; coordinate reference system: WGS84).
Empty cells in Lat, Long, and Altitude indicate that the GPS device was unable to obtain a valid position fix at that sampling interval.
BatID_2007_2019_public.csv
This file contains data from wild common vampire bats (Desmodus rotundus) collected in Peru between 2007 and 2019. The dataset was generated as part of a long-term monitoring programme conducted by Daniel G. Streicker and team. Each row represents an individual bat captured during a sampling event.
- Species is a categorical variable indicating bat species (‘DR’, Desmodus rotundus).
- Department is a categorical variable indicating the Peruvian department where the bat was captured (in total, nine departments).
- Band, bat wing ring number, is a categorical variable containing the unique band identifier assigned to each bat.
- Site is a categorical variable indicating the sampling site (note here that AYA12 and AYA5 are the same roost).
- Sex is a categorical variable indicating the sex of the bat (F = female, M = male; empty cells, NA or ‘-‘= no data recorded).
- Repro is a categorical variable indicating reproductive state (reproductive state = N non-reproductive, S scrotal male, P pregnant female, L lactating female, R and Y = reproductive; empty cells, NA, ‘-‘ or other classification = no data recorded).
- Age is a categorical variable indicating age class (A = adult, SA = subadult, J = juvenile; NA or ‘-‘= no data recorded).
- W is a continuous numeric variable representing bat body mass (unit: grams, g; empty cells or NA = no data recorded).
- Date is a date variable indicating the capture date (format: YYYY-MM-DD; empty cells = no data recorded).
- Month is a discrete numeric variable indicating the month of capture (unit: month; values 1-12).
- Year is a discrete numeric variable indicating the calendar year of capture (format: YYYY).
- UK_Date is a date variable containing the capture date in day/month/year format (DD/MM/YYYY).
- Feeding is a categorical variable indicating feeding status at capture. (Y = fed; N = No fed; NA or ‘-‘= no data recorded).
- Latitude and Longitude are continuous numeric variables indicating the capture location coordinates – the site coordinates (unit: decimal degrees; coordinate reference system: WGS84).
Field_data.rds
Description: contains field data collected at the time of capture for 93 common vampire bats (Desmodus rotundus) captured in the Peruvian departments of Apurímac, Ayacucho, and Cusco during 2022-2023. Each row represents an individual bat captured and fitted with a GPS tag.
This file contains the following information:
- individual is a categorical variable containing a unique identifier for each bat-tag combination.
- ID is a categorical variable identifying the capture site (i.e., 5 roosting sites CUS6, CUS12, API155, API151, AYA20).
- BandIDF is a categorical variable containing the unique bat band identification number (wing ring number).
- Sex is a categorical variable indicating the sex of the bat (F = female, M = male).
- Weight is a continuous numeric variable representing body mass at capture (unit: grams, g).
- Forearm.x is a continuous numeric variable representing forearm length (unit: millimetres, mm; NA = no data recorded).
- Dead is a binary categorical variable indicating whether the bat was found dead during the tracking period (0 = no, 1 = yes).
- TAG.x is a categorical variable containing the unique GPS tag identifier.
- GPS is a continuous numeric variable representing the mass of the GPS tag attached to the bat (unit: grams, g).
- Percentage is a continuous numeric variable indicating tag mass as a percentage of bat body mass (unit: %).
- District is a categorical variable indicating the district where the bat was captured (where the roost is located).
- Rate is a discrete numeric variable indicating the programmed GPS sampling interval (unit: minutes).
Final_GPS_2025.rds
Description: contains the cleaned GPS tracking data used in the Bayesian state-space model. The dataset includes GPS locations from 55 tagged common vampire bats (Desmodus rotundus) together with environmental, individual, and disturbance covariates used in the analyses. Each row represents a GPS location record retained after data cleaning. This dataset contains 1321 observations of 99 variables.
Identification variables
D, ID0 and ID1 are unique row identifiers (integer variables) resultant for the merging and or cleaning operations to create this dataset. For this dataset, ID corresponds to the row ID. ID_bat, TAG, individual, ind_night, and in_code are categorical identifiers for, respectively, bats (unique bat wing ring number), the GPS tag (unique tag identifier), individual bat and tag ID, individual bat-tag ID and night of tracking (0-8) and an ID for each individual bat-tag-night (1 to 242, this variable to be used in the distance matrix of the Bayesian model). Department (categorical variable, corresponds to the Department where the bat roost was located, Apurímac, Ayacucho and Cusco); Local.x and Local.y (categorical variables, both correspond to the name of the place where the bat roost was located, its duplicated information after merging datasets); Local1 (categorical variable, same as before, but for Ayacucho it identifies the cave name).
Individual variables:
‘Gender’ should be read sex - is a categorical variable indicating bat sex (M = male, F = female). Forearm is a continuous numeric variable representing forearm length (mm) (0 = no data recorded).
Date and time variables:
DAY, MONTH, and YEAR indicate the date of the GPS record (units: day, month, and year, respectively). DAYF and MONTHF are duplicate date fields retained from the original data processing workflow (units: day and month, respectively). HOUR, UTC.5 (converted for local hour), MINUTE, and SECOND indicate the time of the GPS fix. SECOND.OF.THE.DAY represents the number of seconds elapsed since midnight (seconds). Time is the timestamp of the GPS expressed in HH:MM:SS (it’s the combination of UTC.5, MINUTE, SECOND.); Period (1-9) is a categorical variable generated during data processing to indicate the night of tracking, but is substituted by the variable night (categorical variable, 0-8). Date.x, is the date associated with each GPS fix (format YYYY-MM-DD) and date_time is the date and time information for each GPS fix (format YYYY-MM-DD HH:MM:SS). It was also extracted, for each bat and night the times of the first and last GPS point (HH:MM:SS), and estimated the start_time (a continuous numeric variable representing the time elapsed between sunset and the first GPS location recorded for a bat on a given night (unit: hours, where values of 0 indicate that the first recorded movement occurred at sunset, while larger values indicate a later departure relative to sunset), and return_time (a continuous numeric variable representing the duration of the bat's activity period, calculated as the time elapsed between the first and last GPS locations recorded during a given night (unit: hours)). Time2 is a time variable indicating the time of each GPS fix (format: HH:MM:SS). It was used to calculate the fractional hour of the observation (hours_frac) and to assign each GPS fix to one of 48 consecutive 15-minute intervals within a night (hour_block, 1-48).
GPS and tracking variables:
Rate is a discrete numeric variable indicating the programmed GPS sampling interval (unit: minutes). No.OF.SATELLITES is the number of visible satellites used to calculate the position (count, number of satellites, in this dataset it varies from 4-9). ALTITUDE is elevation above sea level (m), if 0 means that the GPS was unable to retrieve altitude. CLOCK.OFFSET, ACCURACY.INDICATOR, and BATTERY.LEVEL are metadata fields automatically generated by the GPS tags and required for data processing by the developer (Pathtrack), retained to preserve the original data structure. Accuracy was calculated based on the ACCURACY.INDICATOR during the process of data cleaning, to remove any points with higher error.
Spatial variables:
x and y represent longitude and latitude coordinates of each GPS fix (decimal degrees, WGS84). x1, y1, x2, and y2 are projected spatial coordinates (in meters) from the roost (x1 and y1) and each data point (x2 and y2) to estimate the Euclidean distance in km from each data point to the roost ‘distr’.
Movement variables: Distr represents the Euclidean distance in km from each data point to the roost (continuous numeric variable, in km); Speed represents movement speed between successive fixes (km h⁻¹). dist_p represent distances between successive fixes (km). Diff_min and diff_hour represent elapsed time between fixes (minutes and hours, respectively). lead1 corresponds to the date_time information of the next GPS point (these 4 variables were used to estimate speed).
Night and seasonal variables:
Night (0-8) and night2 (0 (all the other nights) or 1 (if night of disturbance) identify tracking nights. Calendar_night identifies the calendar night, the number of days since the beginning of the year. Season is a categorical variable indicating season (ED = early dry season, D = dry season, LD = late dry season).
Random effects:
Besides the random effect of each bat, we also tried a model with site as random effect (site, levels 1-5) and session of capture (for each site and month of the year, attribute a different ID, corresponding to 9 different levels).
Environmental variables:
- Moon data: With the objective to estimate the number of hours until complete darkness, which depended on the interplay of moonrise, moonset, astronomical night start (occurs after sunset and dusk) and end (occurs before dawn), it was extracted for each location and date (variable conc), the following information – the date and time (YYYY-MM-DD HH:MM:SS) of sunrise, sunset, night start, night end, moonrise and moonset (there was one observation date for which no moonset occurred during the 24-hour period at the study location. Therefore, the moonset variable was recorded as NA). The variables ‘time_to_dark’, ‘night_start2’ and ‘sunset_start’ (all in HH:MM:SS), where used to calculate the elapsed time since darkness began, from sunset (‘hours_dark_sunset’, in hours, 0-24h) and from the night start (‘hours_dark’, in hours, 0-24h).
- Built, crop, water, tree, and grass indicate ESA WorldCover land-cover classes. Prop_built, prop_crop, prop_water, prop_tree, and prop_grass represent the proportion of the surrounding landscape occupied by each land-cover type (proportion, 0-1) within 5 km radii of roosts.
- Mean_roosts and sum_roosts represent estimates of vampire bat roost density (roosts km⁻²) within 5 km radii of roosts.
- Mean_pop, mean_sett, mean_humanfp (all representing density), and n_rural (number/ count of rural settlements) describe human population and settlement metrics derived from census data and other spatial raster layers, within 5 km radii of roosts. Dist_near represents the distance in meters from each roost to the nearest human rural settlement (in meters).
- Mean_cattle represents cattle density (cattle km⁻²) derived from the FAO data.
Data sources:
Venter, O., E. W. Sanderson, A. Magrach, J. R. Allan, J. Beher, K. R. Jones, H. P. Possingham, W. F. Laurance, P. Wood, B. M. Fekete, M. A. Levy, and J. E. Watson. 2018. Last of the Wild Project, Version 3 (LWP-3): 2009 Human Footprint, 2018 Release. Palisades, New York: NASA Socioeconomic Data and Applications Center (SEDAC). https://doi.org/10.7927/H46T0JQ4. Pesaresi, Martino; Politis, Panagiotis (2023): GHS-BUILT-S R2023A - GHS built-up surface grid, derived fromSentinel2 composite and Landsat, multitemporal (1975-2030). European Commission, Joint Research Centre(JRC) [Dataset] doi: 10.2905/9F06F36F-4B11-47EC-ABB0-4F8B7B1D72EA PID:http://data.europa.eu/89h/9f06f36f-4b11-47ec-abb0-4f8b7b1d72ea
Disturbance variables:
Human disturbance was defined as the effects of capture, handling, and tagging procedures. Key variables included the night of capture ('night 0') versus subsequent nights (‘night2’), and the time post-disturbance, calculated as the difference in hours between the start of the tracking session (variable datetimecap YYY-MM-DD HH:MM:SS, and associated variables Date_cap (YYYY-MM-DD) and Capture HH:MM:SS)) and each GPS fix date and time stamp. Time post-disturbance for each bat and each night (continuous numeric variable tfrom_disturbance, in hours) was averaged (mean_t_disturbance, in hours) and also extracted the maximum (max_t_disturbance, in hours), to obtain a single value per bat per night. The mean was used in the model, not the maximum. The variable end_time represents the end of the GPS tracking each morning (06:00:00) and the variable diff_cap is a continuous numeric variable indicating the number of hours between bat capture and each GPS fix recorded during the disturbance night (night 0) (unit: hours). Empty cells indicate missing values (NA), which corresponded for observations in other nights.
total22_23_0s.xlsx
Raw GPS data from vampire bats. It is a tibble with 15,842 rows and 32 columns (in order: department, local, roost latitude and roost longitude, ID bat ring, sex, ID tag, GPS rate, day and final day after converting to UTC-5, same for month and month final, year, hour and UTC-5 hour, minute, second, time in hms, period (each night), second of the day, number of satellites, latitude and longitude of each GPS fix, altitude, clock offset, accuracy indicator, battery level, individual (each bat and tag ID), date and date_time, row ID and a corrected column of local). This file is included to facilitate reproducibility of the data-processing workflow. Variable definitions are equivalent to those described for the file Final_GPS_2025.rds (total22_23_0s.xlsx is the starting point). Missing data has 0 in latitude, longitude and altitude.
model1_06vardv6.rds and diste_06vardv6.rds
rds with the posteriors of the Bayesian state-space model, including the posteriors of the distances for each bat, night and block of 15 minutes in a night.
folder 'variables' (Zenodo)
Description: contains the dataset and raster layers used to derive covariates included in the state-space model. This folder is provided via Zenodo link.
- 1) Census_Peru_AAC2017.xlsx - This file contains information on human settlements in the Peruvian departments of Apurímac, Ayacucho, and Cusco, obtained from publicly available census data provided by the Peruvian Government (INEI, https://www.inei.gob.pe) and CEPLAN (https://www.ceplan.gob.pe/informacion-sobre-zonas-y-departamentos-del-peru/). The original file was translated into English for deposition in Dryad. It contains the following information: Department: categorical variable, name of the Peruvian department (Apurímac, Ayacucho, or Cusco). District: categorical variable, name of the corresponding district. Population_centers: categorical variable, name of the population centre or village. Classification: categorical variable, classification of the population centre as Rural or Urban. Only rural population centres were used in the analyses. Latitude: continuous numeric variable, latitude of the population centre (decimal degrees, WGS84). Longitude: continuous numeric variable, longitude of the population centre (decimal degrees, WGS84). No empty cells are present in this dataset.
- Cattle_2015_AW.tif - Spatial raster layer of cattle density for the departments of Apurímac, Ayacucho, and Cusco. This dataset was obtained from the global cattle distribution dataset described by Gilbert et al. (2022), based on FAO livestock data for 2015. Values represent estimated cattle density (cattle km²). The original raster resolution is approximately 10 km² and was rescaled to approximately 5 km² for use in this study. This raster was used to derive the covariate cattle density included in the state-space model.
- Roost_pred.tif - Spatial raster containing predicted vampire bat roost density derived from Ribeiro et al. (2023). Raster values represent predicted roost density (roosts km²) at a spatial resolution of approximately 8 km². This raster was used to derive the covariate roost density included in the state-space model.
- ESA_WorldCover_10m_2021_v200_S15W075_Map.tif - Spatial land-cover raster from the ESA WorldCover 2021 dataset (Zanaga et al., 2022). The raster with the land-cover classes, has a spatial resolution of 10 m2 and was used to calculate the covariate proportion of permanent water around bat roosts.
References:
Ribeiro, R. et al. Incorporating environmental heterogeneity and observation effort to predict host distribution and viral spillover from a bat reservoir. Proc. R. Soc. B 290, 11 (2023).
Gilbert, M. et al. Global cattle distribution in 2015 (5 minutes of arc). Harvard Dataverse, V1 (2022). doi.org/10.7910/DVN/LHBICE
Zanaga, D. et al. ESA WorldCover 10 m 2021 V200 (2022) doi:10.5281/zenodo.7254221.
Scripts
- Data_cleaning .R - script with all the steps involved in GPS data cleaning and variable extraction.
- testGPS.R - script to analyse the data from a GPS tag placed at a single location in our study area. We used the data to fit a regression of the standard deviation of distances against the number of satellites and estimated the standard deviation of GPS error for each satellite count.
- GLMroost_abandonment2.R - script to conduct the GLM on the drivers of vampire bat roost switching.
- Model - script for the Bayesian state-space model in JAGS. Note: this code needs to be run from lines 1-109 before the code to reproduce the figures associated with the distance.
- Figures and SI.R - script with the code to reproduce results and figures presented in the manuscript and Supporting Information.
- BatID_2007_2019_weights.R - script with the code used to estimate vampire bat body mass changes.
Session info
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS 15.4
attached base packages: grid, stats, graphics, grDevices, utils , datasets, methods, base
other attached packages: dplyr_1.1.4, sf_1.0-19 , readxl_1.4.3, inlabru_2.12.0, fmesher_0.2.0, exactextractr_0.10.0, terra_1.7-71, hms_1.1.3, tidyr_1.3.1, suncalc_0.5.1, gridExtra_2.3, ggforce_0.5.0, ggspatial_1.1.9, plyr_1.8.9, lubridate_1.9.3, sp_2.1-4, ggplot2_3.5.1, readr_2.1.5, patchwork_1.3.0, Epi_2.59, vip_0.4.1, gtsummary_2.0.4, ggeffects_2.2.0, performance_0.13.0, forcats_1.0.0, stringr_1.5.1, purrr_1.0.2, tibble_3.2.1, tidyverse_2.0.0, pscl_1.5.9, future_1.34.0 , data.table_1.15.4, ggmcmc_1.5.1.1, runjags_2.2.2-4, rjags_4-15, coda_0.19-4.1, metrica_2.1.0, reshape2_1.4.4 , flextable_0.9.7, officer_0.6.8, kableExtra_1.4.0, viridisLite_0.4.2, scales_1.3.0, RColorBrewer_1.1-3, ggmap_4.0.0, geodata_0.6-2
