DOI: 10.5061/dryad.6hdr7src3
title: Data from: Release from captivity allows African savannah elephant movement patterns to converge with those of wild and rehabilitated conspecifics

description: The release of captive animals through rewilding or conservation
 translocation is an important strategy for the rehabilitation of
 individuals and ecosystems. Assuming that wild animals are better adapted
 to their environment than captive ones, comparisons between the behaviour
 of released animals and their wild counterparts would allow the evaluation
 of rewilding success. We compared the movement patterns of six
 captive African savannah elephants, subjected to a three-year soft release
 in the western Okavango Delta, Botswana, with those of two elephants
 released over a decade previously and of four wild elephants. GPS fixes at
 1800hrs were used to calculate daily displacement, 30-minute diurnal and
 nocturnal distances, cumulative daily distances, and home ranges for all
 study animals; the effects of elephant group, phase, year, and season on
 these movement metrics were analysed. Captive elephants were most affected
 by the phase and changed their movements after release. After release, the
 movement patterns of captive elephants were less different from those of
 rehabilitated elephants than wild elephants, possibly due to sample size,
 which could indicate that rewilded animals may not be able to fully
 approximate the behaviour of wild-born individuals. However, the captive
 elephants should exhibit seasonality in movement patterns just like
 rehabilitated and wild elephants. These results highlight the critical
 importance of long-term monitoring of animals to allow the evaluation of
 release and translocation, which is recommended for other similar
 studies. The data collection was approved by the UB ethics
 committee (UBR/RES/IRB/SOC/132).
description: # Data from: Release from captivity allows African savannah elephant
 movement patterns to converge with those of wild and rehabilitated
 conspecifics ### Analysis Dataset and Code **General Introduction** The
 project "Release from captivity allows African savannah elephant
 movement patterns to converge with those of wild and rehabilitated
 conspecifics" investigates the movement of rewilded African savannah
 elephants (Loxodonta africana) in the western Okavango Delta, Botswana.
 This study compares movement patterns of captive, previously released
 (rehabilitated), and wild elephants using GPS data from collared elephants
 to evaluate rewilding success. Four R scripts—30_minute_script.R,
 Cumulative_Daily_Distance_script.R, Displacement_script.R, and
 Home_range_script.R—analyze are saved in the zip file called
 R_Scripts.zip. Four key movement metrics: 30-minute movement distances,
 Cumulative daily distances, daily displacement (net displacement between
 consecutive days at 18:00), and monthly 95% Kernel Density Estimation
 (KDE) home range areas were analysed using these R_scripts as stated
 below. These scripts fit generalized linear mixed-effects models (GLMMs)
 to assess the effects of factors such as phase, season, year, day/night
 (for 30-minute data), and elephant origin on movement metrics. They also
 generate visualizations to compare results across groups. This work
 highlights the importance of long-term monitoring in evaluating rewilding
 outcomes and understanding how captive elephants adapt to wild movement
 patterns. The Botswana Ministry of Environment, Natural Resources
 Conservation and Tourism granted the research permission (Permit
 ENT8/36/4L(43)) and the Botswana Department of Wildlife and National Parks
 issued the release permit (WP SAF 16/4/1 II (1)), while the University of
 Botswana Office of Research and Development provided the ethics approval
 (UBR/RES/IRB/SOC/132). The R scripts were developed and tested on R
 version 4.5.1 Instructions for Use 1. Place the data files
 (30_min_dist.csv, daily_range.csv, last_coords_local.csv,
 kde_95_monthly.csv) in your working directory. Download the Data.zip and
 extract the csv files into your working directory. 2. Open the R scripts
 30_minute_script.R, Cumulative_Daily_Distance_script.R,
 Displacement_script.R, and Home_range_script.R in R or RStudio. 3. Update
 the setwd() path in each script to match the location of your working
 directory. For example: setwd("/path/to/your/directory") 4.
 Install the required R packages listed below for each script. 5. Run the
 scripts to preprocess data, generate visualizations, and fit GLMMs. Three
 datasets are provided: * 30_min_dist.csv: 30-minute movement data\
 Columns/Variables: * Column A - row number for the data. No column heading
 * Column B - "CollarID", is the column for the names given to
 each of the elephants in the study. Each elephant had a distinct name *
 Column C - "date_timestamp_local", is the timestamp
 (month/day/year hour:minutes) for the Botswana local time (+ 2 GMT) *
 Column D - "seasons", is the column for the seasons of the
 Okavango Delta flooding patterns. The seasons are 4 months long each *
 Column E - "release_phase", is the column for the names of
 different phases of the soft release. * Column F - "ele_origin",
 is the column that shows the category of the elephant in this study.  *
 Column G - "dist_moved", is the distances measured between 2
 consecutives GPS fixes in meters. * Column H - "Year", is the
 column that shows the years of the data was collected with 1st December
 2021 marking the beginning of year 1 of the data used in this study. *
 Column I - "day_night", is the column that shows the time of day
 when the data was collected. * last_coords_local.csv: Daily displacement
 data\ Columns/Variables: * Column A - row number for the data. No column
 heading * Column B - "CollarID", is the column for the names
 given to each of the elephants in the study. Each elephant had a distinct
 name * Column C - "date_timestamp_local", is the timestamp
 (month/day/year hour:minutes) for the Botswana local time (+ 2 GMT) *
 Column D - "seasons", is the column for the seasons of the
 Okavango Delta flooding patterns. The seasons are 4 months long each *
 Column E - "release_phase", is the column for the names of
 different phases of the soft release. * Column F - "ele_origin",
 is the column that shows the category of the elephant in this study.  *
 Column G - "dist_to_next_day", is the distance between GPS fixes
 of consecutive 18:00 hours in meters * Column H - "Year", is the
 column that shows the years of the data was collected with 1st December
 2021 marking the beginning of year 1 of the data used in this study. *
 Column I - "season_number", is the number allocated to each
 number starting with the first season as the season when the captive
 elephants were collared * Column J - "year_regular", is the
 column of the Calendar year in Gregorian calendar * Column K -
 "log_dist_to_next_day", is the log of the dist_to_next_day
 (Column G) * kde_95_monthly.csv: Monthly 95% KDE home range data\
 Columns/Variables * Column A - row number for the data written as the
 95...[row number], where 95 shows the kernel density estimate 95% contour.
 No column heading * Column B - "CollarID", is the column for the
 names given to each of the elephants in the study. Each elephant had a
 distinct name * Column C - "year_month", is the column of  the
 calendar year (Gregorian calendar) and month for which the kernel density
 estimate (95 % contour) was generated. Month is given as a three-letter
 English abbreviation * Column D - "year", is the column of the
 Calendar year in Gregorian calendar * Column E - "month", is the
 column of the month as a three-letter English abbreviation * Column F -
 "period", is the column of the period when the elephants were
 controlled (before) and when they were officially released with their
 movements not controlled (after) * Column G - "ele_origin", is
 the column showing the category of the elephants, whether it was captive
 (elephants that were long-term captive and released during the course of
 this study), rehabilitated (elephants that were previously captive and
 released before this study commenced, over ten years ago), or wild (wild
 elephants with no known history of captivity) * Column H -
 "seasons", "seasons", is the column for the seasons of
 the Okavango Delta flooding patterns. The seasons are 4 months long each *
 Column I - "kde_95_area", is the column of the calculated area
 of the 95% kernel density estimate (KDE) contour calculated for each
 elephant in each year-month in square kilometres (km²) Analysis Scripts
 30-Minute Movement Analysis Introduction script processes 30-minute
 movement distances from 30_min_dist.csv to analyze fine-scale movement
 patterns. It generates visualizations (histograms, bar plots) to compare
 movement distances by elephant origin, period (Before vs. After), season,
 and day/night. It also fits GLMMs to assess the effects of season, phase,
 year, day/night, and elephant origin on movement distances, including
 model diagnostics and post-hoc comparisons. CSV File 30_min_dist.csv
 Requirements R packages:  MuMIn (for model selection with dredge) lme4
 (for generalized linear mixed-effects models),  DHARMa (for model
 diagnostics),  dplyr (for data manipulation),  lubridate (for date-time
 handling),  ggplot2 (for plotting),  patchwork (for combining plots), 
 e1071 (for skewness calculation),  emmeans (for post-hoc comparisons), 
 geosphere (for Haversine distances in preprocessing) All packages can be
 installed using the code below:  install.packages(c("MuMIn",
 "lme4", "DHARMa", "dplyr",
 "lubridate", "ggplot2", "patchwork",
 "e1071", "emmeans", "geosphere")) When
 running the script 30_minute_script.R, it should: * Generate histograms of
 30-minute movement distances by period, overall, and for Captive, Before,
 and After subsets, with density curves. * Generate bar plots of average
 movement distances by elephant origin, period, season, and day/night, with
 standard error bars. * Fit generalized linear mixed-effects models to
 assess the effects of season, release phase, year, day/night, and elephant
 origin on movement distances. * Provide summaries of the fitted
 mixed-effects models and dredge results. * Provide post-hoc comparisons
 using emmeans for Captive, Before, and After periods. * Generate residual
 diagnostic plots using DHARMa to assess model fit. * Calculate skewness
 for movement distances by period. Cumulative daily distance. This script
 aggregates 30-minute movement data from 30_min_dist.csv into cumulative
 daily distances, representing the total distance moved per day. It
 generates visualizations (histograms, bar plots) to compare cumulative
 daily distances by elephant origin, period, and season, and fits GLMMs to
 assess the effects of season, release phase, and elephant origin on daily
 movement distances, including model diagnostics and post-hoc comparisons.
 CSV Files 30_min_dist.csv Requirements R packages:  MuMIn (for model
 selection with dredge) lme4 (for generalized linear mixed-effects models)
 DHARMa (for model diagnostics),  dplyr (for data manipulation),  lubridate
 (for date-time handling),  ggplot2 (for plotting),  patchwork (for
 combining plots),  e1071 (for skewness calculation),  emmeans (for
 post-hoc comparisons),  geosphere (for Haversine distances in
 preprocessing) All packages can be installed using the code below: 
 install.packages(c("MuMIn", "lme4",
 "DHARMa", "dplyr", "lubridate",
 "ggplot2", "patchwork", "e1071",
 "emmeans", "geosphere")) When running the script
 30_minute_script.R, it should: * Generate histograms of cumulative daily
 distances by period, overall, and for Captive, Before, and After subsets,
 with density curves. * Generate bar plots of average cumulative daily
 distances by elephant origin, period, and season, with standard error
 bars. * Fit generalized linear mixed-effects models to assess the effects
 of season, release phase, and elephant origin on daily movement distances.
 * Provide summaries of the fitted mixed-effects models and dredge results.
 * Provide post-hoc comparisons using emmeans for Captive, Before, and
 After periods. * Generate residual diagnostic plots using DHARMa to assess
 model fit. * Calculate skewness for cumulative daily distances by period.
 Displacement This script processes daily displacement data at 18:00 from
 last_coords_local.csv, capturing net movement between consecutive days. It
 generates visualizations (histograms, bar plots, boxplots) to compare
 displacement by elephant origin, period, and season, and fits GLMMs to
 assess the effects of season, year, release phase, and elephant origin on
 displacement, including model diagnostics and post-hoc comparisons. CSV
 File last_coords_local.csv Requirements R packages:  MuMIn (for model
 selection with dredge) lme4 (for generalized linear mixed-effects models)
 DHARMa (for model diagnostics, s),  dplyr (for data manipulation), 
 lubridate (for date-time handling),  ggplot2 (for plotting),  patchwork
 (for combining plots),  e1071 (for skewness calculation),  emmeans (for
 post-hoc comparisons) All packages can be installed using the code below: 
 install.packages(c("MuMIn", "lme4",
 "DHARMa", "dplyr", "lubridate",
 "ggplot2", "patchwork", "e1071",
 "emmeans")) When running the script Displacement_script.R, it
 should: * Generate histograms of daily displacement distances by period,
 overall, and for Captive, Before, and After subsets, with density curves.
 * Generate bar plots of average displacement by elephant origin, period,
 and season, with standard error bars. * Fit generalized linear
 mixed-effects models to assess the effects of season, year, release phase,
 and elephant origin on displacement. * Provide summaries of the fitted
 mixed-effects models and dredge results. * Provide post-hoc comparisons
 using emmeans for Captive, Before, and After periods. * Generate residual
 diagnostic plots using DHARMa to assess model fit. * Calculate skewness
 for displacement distances by period. Home RangeThiss This script
 processes precomputed monthly 95% KDE home range areas from
 kde_95_monthly.csv, representing the spatial extent of elephant movement.
 It generates visualizations (histograms, bar plots) to compare home range
 sizes by elephant origin, period, and season, and fits GLMMs to assess the
 effects of release phase, season, and elephant origin on home range sizes,
 including model diagnostics and post-hoc comparisons. CSV File
 kde_95_monthly.csv Requirements R packages:  MuMIn (for model selection
 with dredge) lme4 (for generalized linear mixed-effects models),  DHARMa
 (for model diagnostics),  dplyr (for data manipulation),  ggplot2 (for
 plotting),  e1071 (for skewness calculation),  emmeans (for post-hoc
 comparisons) All packages can be installed using the code below: 
 install.packages(c("MuMIn", "lme4",
 "DHARMa", "dplyr", "ggplot2",
 "e1071", "emmeans")) When running the script
 Home_range_script.R, it should: * Generate histograms of monthly 95% KDE
 home range areas by period, overall, and for Captive, Before, and After
 subsets, with density curves. * Generate bar plots of average 95% KDE
 areas by elephant origin, period, and season, with standard error bars. *
 Fit generalized linear mixed-effects models to assess the effects of
 release phase, season, and elephant origin on home range sizes. * Provide
 summaries of the fitted GLMMs and dredge results. * Provide post-hoc
 comparisons using emmeans for Captive, Before, and After periods. *
 Generate residual diagnostic plots using DHARMa to assess model fit. *
 Calculate skewness for home range areas by period. Reproducibility *
 Ensure all required R packages are installed using the provided
 install.packages() commands. * Verify that 30_min_dist.csv,
 daily_range.csv, last_coords_local.csv, and kde_95_monthly.csv are in the
 working directory. * Update the setwd() path in each script to point to
 your working directory. * Run the scripts in R (version 4.5.1 or higher)
 to reproduce the analyses. * Check for missing values or data
 inconsistencies using summary() and table() functions, as outlined in the
 scripts. * For home range analysis, note that kde_95_monthly.csv contains
 precomputed KDE areas. To recompute these areas from raw GPS data, users
 would need additional scripts and the All_elies_regular_30min.csv dataset
 (not included). For questions about this dataset or scripts, please
 contact:  Murphy Tladi ([201000042@ub.ac.bw](mailto:201000042@ub.ac.bw) or
 [murphytladi@ymail.com](mailto:murphytladi@ymail.com))