Data from: Simulated poaching affects global connectivity and efficiency in social networks of African savanna elephants—An exemplar of how human disturbance impacts group-living species
Data files
Aug 15, 2025 version files 450.66 MB
-
deletion_simulations_EmpData.R
35.46 KB
-
Fig_1_Dryad.zip
116.18 MB
-
Fig_1S_Dryad.zip
130.36 KB
-
Fig_2S_Dryad.zip
92 KB
-
Fig_3_Dryad.zip
288.98 KB
-
Fig_4_Dryad.zip
12.57 KB
-
Fig_5_Dryad.zip
686.06 KB
-
README.md
19.14 KB
-
Table_3S_Dryad.zip
87.27 MB
-
Table_4S_Dryad.zip
245.89 MB
-
wbFamInteractionMatrixPLOSRevised.csv
54.53 KB
-
wiAndbwFamDemography.csv
4.12 KB
Abstract
Selective harvest, such as poaching, impacts group-living animals directly through mortality of individuals with desirable traits, and indirectly by altering the structure of their social networks. Understanding the relationship between disturbance-induced, structural network changes and group performance in wild animals remains an outstanding problem. To address this problem, we evaluated the immediate effect of disturbance on group sociality in African savanna elephants — an example, group-living species threatened by poaching. Drawing on static association data from ten free-ranging groups, we constructed one empirically based, population-wide network and 100 virtual networks; performed a series of experiments ‘poaching’ the oldest, socially central or random individuals; and quantified the immediate change in the theoretical indices of network connectivity and efficiency of social diffusion. Although the social networks never broke down, targeted elimination of the socially central conspecifics, regardless of age, decreased network connectivity and efficiency. These findings hint at the need to further study resilience by modeling network reorganization and interaction-mediated socioecological learning, empirical data permitting. The main contribution of our work is in quantifying connectivity together with global efficiency in multiple social networks that feature the sociodemographic diversity likely found in wild elephant populations. The basic design of our simulation makes it adaptable for hypothesis testing about the consequences of anthropogenic disturbance or lethal management on social interactions in a variety of group-living species with limited, real-world data.
When using these data, please cite both the original article and the Dryad package as follows:
Wisniewska M, Puga‑Gonzalez I, Lee PC, Moss C, Russell G, Garnier S, Sueur C. (2021). Simulated poaching affects global connectivity and efficiency in social networks of African savanna elephants. PLOS Computational Biology, 17(11): e1009792. https://doi.org/10.1371/journal.pcbi.1009792.
and
Wisniewska M, Puga‑Gonzalez I, Lee PC, Moss C, Russell G, Garnier S, Sueur C. (2025). Data from: Simulated poaching affects global connectivity and efficiency in social networks of African savanna elephants. Dryad Digital Repository. https://doi.org/10.5061/dryad.XXXXXXX (to be completed upon acceptance)
Section 1: deletion_simulations_EmpData.R
Purpose: Runs targeted and random node-deletion (“poaching”) experiments on the empirically based elephant social network to quantify how global network metrics degrade when key individuals are removed. Targeting can be by age or by graph metrics (degree, strength, betweenness, eigenvector centrality).
#### Code & Software
-
R 4.3.1 for most sections below unless mentioned otherwise
-
Packages: igraph, ggplot2, cowplot, brainGraph, tnet, fitdistrplus
#### Data & File Overview
* Interaction matrix (or edgeMatrix) — i.e., wbFamInteractionMatrixPLOSRevised.csv
o Square adjacency matrix; cells = association index (edge weight).
* Node attributes ( or nodeAttributs) — i.e., wiAndbwFamDemography.csv
o Columns (renamed in the script):
-
Id - unique identifier for the individual.
-
ClanDNA/Behavior - individual's clan based on genetic or behavioral data; an individual can belong to clan K1, K2, or K3; the letter-number combination is merely an identification term and has no biological meaning.
-
ClanBondDNA/Behavior - individual's bond group within a clan.
-
BondDNA/Behavior - individual's specific bond group; an individual can belong to bond group (a mere identification term) B1, B2,…, or B8.
-
CoreBehavior -individual's core social group; an individual can belong to a core group named e.g., EB or OA; the bigram is an identification term originally assigned by the Amboseli research team to different bond groups; it has no biological meaning.
-
FamilySize - size of the individual's family unit.
-
YOB - individual's year of birth.
-
YO2001 - individual's age in the year 2001.
-
AC2001- individual's age category in 2001, where S indicates a subadult, A-adult, M-matriarch, G-grand-matriarch
-
Label - descriptive label for the individual.
Files can be selected interactively via file.choose().
Variables & Parameters
-
Matrix: adjacency matrix.
-
Nsimulation: number of times the full deletion simulation should run to bet avg. results (e.g., 1000).
-
DeletePercent: total % of nodes to remove.
-
DeleteStep: % removed per step.
-
Metric: character string defining the targeting strategy: degree, strength, betweenness, eigenCentrality
-
weighted / directed: booleans controlling if Metric should use edge weight.
-
byAge: if TRUE, overrides Metric and deletes by age.
-
AgeVec: numeric vector of ages (required when byAge = TRUE).
Section 2: Fig 1 Code.R in Fig_1_Dryad.zip
Purpose: Analyzes and visualizes the distribution of association indices (AIs) in empirically-based (real) and virtual (simulated) elephant populations. Dyads are binned by age-category pair and social/kinship tier (core, bond, clan). It produces two 2by2 grids of boxplots—one for the empirically-based data and one for the virtual data. Nothing is written to disk by default; plots are shown in the R graphics device.
Code & Software
- Packages (not required): ggplot2, dplyr, here (for nicer plotting/refactoring/path handling).
Data & File Overview
Place these files locally and update hard-coded paths (or replace with file.choose()).
Empirical population inputs
-
wbFamInteractionMatrixPLOSRevised.csv — adjacency/edge matrix (using association indices).
-
wiAndbwFamDemography.csv — node attributes (demography & social grouping).
Virtual populations inputs
-
Populations.RData — loads Pop_and_IntMat, a list where each elements contain a simulated population data frame (DF_Pop) with fields such as ID, AGE, CLAN, BOND, CORE (parallel meanings to empirically-based attributes); and by default (Int_Mat_Ind), a virtual interaction matrix among individuals described in(DF_Pop)which is not necessary for graphing
-
Networks_500.RData — loads Networks_500 (along with Pop_and_IntMat,and result which are not necessary for graphing). Networks_500 is a list of 100 simulated adjacency matrices. Edge values are raw interaction counts; the script divides them by DEN to approximate AI-like values. The i-th matrix matches the i-th entry in Pop_and_IntMat.
Variables & Parameters
-
CLAN/BOND/CORE/- per individual kinship assignment analogous to clan K1/K2/K3, bond B1/B2…, and core group EB or OA but core group here is indicated with # 1,2,3…
-
AGE – age assignment with indicating S as subadult, A adult, M matriarch, GM grand-matriarch
Virtual-analysis controls
-
DEN = 500 — divisor used to normalize interaction counts.
-
Ndyads = 1000 — number of randomly sampled dyads per virtual network.
Section 3: eleSNAMS3EmpiricalNet.gephi in Fig_3_Dryad.zip
Purpose: Provide a standardized Gephi workspace for the empirically-based and virtual networks to visualize side-by-side comparison, detect community clusters and , and if desired export comparable figures/tables—using consistent, reproducible settings across both files.
Code & Software
- Gephi 0.9.2
Data & File Overview
-
eleSNAMS3EmpiricalNet.gephi — empirically-based elephant social network based on wbFamInteractionMatrixPLOSRevised.csv adjacency matrix described in previous Section 1 and wiAndbwFamDemography.csv.
-
eleSNAMS3Virtual90Net.gephi — simulated (“virtual”) network #90 from Networks_500.RData, specifically Networks_500[90] or a list of simulated adjacency (interaction) matrices detailed in Section 2.
Variables & Parameters
-
Type: Undirected, weighted graphs (edges = interaction/association strength).
-
Nodes: ID designations containing demographic information such as age class and group membership (clan/bond/core) as designed in Sections 1 and 2 and a range of computed metrics (e.g., degree, closeness)
-
Layout: Fruchterman–Reingold.
-
Edges: Original / straight rendering.
-
Filter: “> 5%” strength filter applied (kept only the strongest ties; exact rule: weight > 5% of max).
-
Relevant Metrics computed in Gephy: Betweenness centrality (“Bet”)
-
Styling:
o Nodes: nodes partitioned/ranked (colored) by Age category (i.e., S/A/M/G as described in Section 2). and Betweenness centrality (value), after filtering.
Section 4: graphing_EmpData.R in Fig_4_Dryad.zip
Purpose: Plots how empirically-based network indices change as a function of deletion proportion (in the code labeled as deletion proportion) and deletion type (Targeted vs. Random), partitioned by Age and Betweenness targeting. Produces panels for Clustering coefficient, Modularity (Weighted), Diameter (W), and Global efficiency (W); an optional combined figure can also be created. Nothing is written to disk by default; plots are shown in the R graphics device.
Code & Software
- Packages: ggplot2, Rmisc, huxtable, gridExtra, grid, lattice
Data & File Overview
Place these files locally and update the hard-coded paths in read.csv() (or use file.choose()).
-
Age: graphingCC.AgePLOS.csv, graphingModW.AgePLOS.csv, graphingDiamW.AgePLOS.csv, graphingGlEffW.AgePLOS.csv
-
Betweenness: graphingCC.BetPLOS.csv, graphingModW.BetPLOS.csv, graphingDiamW.BetPLOS.csv, graphingGlEffW.BetPLOS.csv
Expected columns (per file):
-
Deletion.Type — “Random” or “Targeted”
-
Deletion.Percent — numeric in 0–1 (e.g., 0.04 = 4%)
-
Index.Value — mean value of the network metric at that deletion level/type
-
N, sd, se, ci — sample size, dispersion, and confidence interval from aggregation
If starting from raw *.Del.Results, aggregate first with Rmisc::summarySE() to match this schema.
Variables & Parameters
Plot controls used in the script
• Y-limits per metric):
* Clustering coefficient: 0.66–1
* Modularity (W): 0.225–1
* Diameter (W): 20–30
* Global efficiency (W): 0.8–1
Curves show mean and 95% confidence interval versus Deletion.Percent, with separate traces for Age and Bet regimes and for Targeted vs. Random deletion.
Section 5: FigDelSim Virtual Networks.R in Fig_5_Dryad.zip
Purpose: As in Fig. 4 this code is to plot how for virtual networks (runs capped at 500 simulation time steps), the indices change as a function of deletion proportion and deletion type (Targeted vs. Random), partitioned by Age and Betweenness targeting. Produces side-by-side panels for Clustering coefficient, Modularity (W), Diameter (W), and Global efficiency (W); an optional combined figure can also be created. Nothing is written to disk by default; plots are shown in the R graphics device.
Code & Software
- Packages: ggplot2, gridExtra, grid, lattice
Data & File Overview
Place these files locally and update the hard-coded paths in load() (or use file.choose()).
- Analysis_Networks_500_Age90.RData/ Analysis_Networks_500_Bet90.RData — loads result with outputs from the targeted and random deletion experiments on an example virtual network (ie., 90th network). The data represents the mean values (and 95% confidence interval calculated from SE) for the previously mentioned four network indices (e.g., Clustering Coefficient) after node removal per Age/Betweenness. The example virtual network that is comparable in size to the empirically-based social network. For clarity, the script assigns DF_Age/Bet result.
Why order matters: both files define result. Load Age first and assign to DF_Age, then load Bet and assign to DF_Bet to avoid overwriting.
Variables & Parameters
Network Indices Analyzed (are seen on the y-axis):
-
DfCC: Data frame for the Clustering Coefficient.
-
DfModW: Data frame for Modularity Weighted.
-
DfDiameterW: Data frame for the network DiameterW.
-
DfGEW: Data frame for Global EfficiencyW.
Parameters on the x-axis:
-
Deletion_Type: A categorical variable that distinguishes between the four experimental conditions (e.g., "Age Category Targeted/Random", "Bet Category Targeted/Random").
-
Proportion: A numerical variable (i.e., 0, 0.04, …, 0.20) representing the proportion of nodes deleted from the network. This is seen on the x-axis.
Section 6: Code Fig 1S.R in Fig_1S_Dryad.zip
Purpose: Creates Fig. 2 (Supplemental): box-and-whisker plots that show how eight global network metrics change as the number of interaction time-steps grows in the virtual population simulation (snapshots at 25, 50, … 500). The script loads twenty Global_Metrics_*.RData files, tags each with its interaction count, concatenates them, and draws a 2 by 4 grid of boxplots (Density, Clustering coefficient, Diameter W, Modularity W, Global efficiency W). No files are written by default; plots are displayed in the R graphics device.
Code & Software
- Packages: base graphics only (ggplot2 not required, but any graphics device such as png() or pdf() can be added manually).
Data & File Overview
Place the following files in one folder and update each load() path (or replace with file.choose()).
Inputs (RData, one per snapshot)
-
Global_Metrics_25.RData
-
Global_Metrics_50.RData
-
…
-
Global_Metrics_500.RData
Each file contains a single data-frame object named DF_Global_Metrics_ (e.g., DF_Global_Metrics_75) with the columns listed below.
Variables & Parameters
Global network indices (plotted on the y-axis):
-
Den— Density (not used for graphing)
-
CC— Clustering coefficient
-
DiamuW— Diameter (un-weighted)
-
DiamW — Diameter (weighted)
-
Mod— Modularity (un-weighted) (not used)
-
ModW— Modularity (weighted)
-
GEuW— Global efficiency (un-weighted) (not used)
-
GEW— Global efficiency (weighted)
-
Interactions — numeric; the time-step snapshot the rows came from (25, 50, …, 500). The script appends this column after each load.
Section 7: Fig 2S code.R in Fig_2S_Dryad.zip
Purpose: Quantifies and visualizes how removing the bottom-3 % of association weights (“weakest links”) in 500-time-step virtual elephant networks is distributed across age-pair dyads and four kinship groups, before any targeted or random node-deletion experiments, to gauge how loss of weak ties might prime a network to fragment in later deletion experiments. A box-plot shows the percentage of links removed per age-pair within each kinship group. Nothing is written to disk; the plot appears in the R graphics device.
Code & Software
- Packages: ggplot2
Data & File Overview
Place the .RData file in your working directory and update the load() path (or use file.choose()).
Input (RData, single schema)
- DF_Dyads_Deleted_Per_CutOff.RData — loads result, a list of six data-frames:
result[[1]] = 0 % filter, [[2]] = 1 %, [[3]] = 2 %, [[4]] = 3 %, [[5]] = 4 %, [[6]] = 5 %.
The script selects result[[5]] ( 3 % cut-off ). Change the index to plot a different threshold.
Expected columns (per data-frame)
1. Dyad — 16 ordered age-pair codes (SS, SA, … GM, GG)
2. Group — social tier: “CoCo”, “CoBo”, “ClCl”, “NCNC”
3. Percentage — fraction (0–1) of links in that Dyad by Group removed at the chosen cut-off
Variables & Parameters
* Global network indices (plotted on the y-axis):Age-pair codes (Dyad) – first letter = focal individual’s age; second letter = partner’s age.
S = sub-adult, A = adult, M = matriarch, G = grand-matriarch
(e.g., SA = Sub-adult - Adult pair).
The script orders the 16 combinations: SS SA SM SG AS AA … GM GG.
* Social tiers (Group, relabelled)
o Within core group (formerly CoCo) – same core.
o Core – Bond groups (CoBo) – same bond, different core.
o Core – Clan groups (ClCl) – same clan, different bond.
o Core – No Clan groups (NCNC) – different clans.
* Cut-off chosen – result[[4]] = 3 % weakest links removed. To visualize another cut-off, change the list index (e.g., result[[3]] for 2 %).
Section 8: Table3S_EffectSizer.R in Table_3S_Dryad.zip
Purpose: Generates the data for Table 3S by quantifying the effect sizes of targeted vs. random node deletion across multiple network snapshots (e.g., at 100 or 500 time steps), deletion strategies (e.g., per Age or Betweenness), and deletion levels (e.g., after deleting 4%). Outputs are .RData files containing per-metric matrices (100 runs, 5 deletion levels) and summary tables (mean & SD) for plotting or tabulation.
Data & File Overview
* Directory structure contains subfolders per interaction step (Networks_100, Networks_200, etc.).
* Each interaction-step folder contains subfolders for each deletion targeting strategy (Age, Bet, BetW, Degree, Strength).
* Each deletion-strategy subfolder contains 10 .RData files (one per simulation run), named:
o Analysis_Networks__.RData
Example generic/specific:
o Analysis_Networks__.RData
o Analysis_Networks_200_Age9.RData where:
-
Interactions = number of interactions before deletion (e.g., 200)
-
Metric = deletion targeting strategy (e.g., Age)
-
Run = simulation run ID (1–100)
Contents of each .RData file
* Contains a single object with at least two list elements:
o ResultPerSimulationTarget — list of 8 data frames/matrices containing network metrics (e.g., for Age or Bet.) after targeted deletion.
o ResultPerSimulationRandom — list of 8 data frames/matrices containing network metrics after random deletion.
* Each element in ResultPerSimulationTarget/Random corresponds to one of eight network-level indices:
o Diam — Diameter (unweighted)
o Cl — Clustering coefficient (unweighted)
o CC — Connected components (count)
o Mod — Modularity (unweighted)
o GE — Global efficiency (unweighted)
o DiamW — Diameter (weighted)
o ModW — Modularity (weighted)
o GEW — Global efficiency (weighted)
Columns in each data frame represent network metric values at 5 deletion levels: 4 %, 8
Variables & Parameters
-
Networks – vector of interaction steps: c("100","200","300","400","500")
-
Metric – deletion targeting strategy: c("Age","Bet","BetW","Deg","Str"); only Age and Bet. are presented in the manuscript table 3s
-
Deletion fractions – fixed at: 4 %, 8 %, 12 %, 16 %, 20 %.
-
n – number of simulation runs per scenario: 100.
Section 9: Code for TableS4 in Table_4S_Dryad.zip
Purpose: Aggregates and summarizes how network fragmentation evolves under targeted versus random node deletion when a small fraction of the weakest links (1–3%) is removed prior to deletions. The script scans result files for multiple deletion targeting strategies (Age, Betweenness, Degree), computes the percentage of runs that fragment (>1 cluster) at five deletion fractions (4%, 8%, 12%, 16%, 20%), and records min/max cluster counts and the number of networks that started as a single connected component.
Data & File Overview
Place the metric-specific folders under a common parent directory (path). Each folder corresponds to a deletion targeting strategy and contains 100 RData files (one per simulation run):
Folder names (expected):
o Age.zip
o Bet.zip
File naming convention inside each folder:
* Analysis_CutOff_Net_500_.RData (e.g., Analysis_CutOff_Net_500_Age9.RData)
Each RData file must contain a single object (list-like) indexed by cut-off level b = 1..5 corresponding to:
1% , 1.5% , 2% , 2.5% , 3% weakest-link removal.
For each b, the object is expected to provide:
o NetworkInitialState — character: 'Network started as one cluster' or 'Network started FRAGMENTED'.
o DfClusters — a matrix/data frame where the first column gives the number of connected components
at successive node-deletion proportions for Random (rows 2:6) and Targeted (rows 8:12) regimes.
Variables & Parameters
-
path — parent directory containing the three metric folders (Age, Bet, Deg).
-
Metric — character vector c('Age','Bet','Deg') used for labeling outputs.
-
Runs — 100 result files per metric (Run = 1..100).
-
Cut-off levels (pre-deletion weakest-link removal) — 1%, 1.5%, 2%, 2.5%, 3% (5 rows in outputs).
-
Deletion fractions (node removals during experiments) — 4%, 8%, 12%, 16%, 20% (5 primary columns).
-
Cluster threshold — a run is considered fragmented if the number of clusters > 1.
- Wiśniewska, Maggie; Puga-Gonzalez, Ivan; Lee, Phyllis et al. (2022). Simulated poaching affects global connectivity and efficiency in social networks of African savanna elephants—An exemplar of how human disturbance impacts group-living species. PLOS Computational Biology. https://doi.org/10.1371/journal.pcbi.1009792
