DOI: 10.5281/zenodo.17652240
title: Spatio-temporal dynamics of attacks around deaths of wolves: A statistical assessment of lethal control efficiency in France

description: Description

This repository contains the supplementary materials (Supplementary_information.pdf, Supplementary_figures.pdf, Supplementary_tables.pdf) of the manuscript: "Spatio-temporal dynamics of attacks around deaths of wolves: A statistical assessment of lethal control efficiency in France". This repository also provides the R codes and datasets necessary to run the analyses described in the manuscript. 

Datasets

We provide the spatially anonymized R datasets to respect confidentiality. Therefore, the preliminary preparation of the data is not provided in the public codes. These datasets, all geolocated and necessary to the analyses, are:



Attack_sf.RData: 19,302 analyzed wolf attacks on sheep    - ID: unique ID of the attack    - DATE: date of the attack    - PASTURE: the related pasture ID from "Pasture_sf" where the attack is located    - STATUS: column resulting from the preparation and the attribution of attacks to pastures (part 2.2.4 of the manuscript); not shown here to respect confidentiality  

Pasture_sf.RData: 4987 analyzed pastures grazed by sheep      - ID: unique ID of the pasture    - CODE: Official code in the pastoral census    - FLOCK_SIZE: maximum annual number of sheep grazing in the pasture    - USED_MONTHS: months for which the pasture is grazed by sheep  

Removal_sf.RData:  232 analyzed single or multiple wolf removals     - ID: unique ID of the removal    - OVERLAP: are they single removal ("single" in the manuscript => "NO" here), or not ("multiple" in the manuscrit, here "SIMULTANEOUS" for removals occurring during the exact same operation or "NON-SIMULTANEOUS" if not).     - DATE_MIN: date of the single removal or date of the first removal of a group    - DATE_MAX: date of the single removal or date of the last removal of a group    - CLASS: administrative type of the removal according to definitions from 2.1 part of the manuscript    - SEX: sex of the removed wolves if known    - AGE: class age of the removed wolves if known    - BREEDER: breeding status of the removed female wolves, "Yes" for female breeder, "No" for female non-breeder. Males are "No" by default, when necropsied; dead individuals with NA were not found.     - SEASON: season of the removal, as defined in part 2.3.4 of the manuscript    - MASSIF: mountain range attributed to the removal, as defined in part 2.3.4 of the manuscript  

Mountain_range_buff_sf.RData: one row for each mountain range, corresponding to the buffered mountain ranges where removal control events could be sampled, as defined in part 2.3.3 of the manuscript   

Area_to_exclude_sf.RData: one row for each mountain range, corresponding to the area too close from other mountain ranges, terrestrial and maritime limits, where removal control events could not be sampled, as defined in part 2.3.3 of the manuscript 

Overlapping_removal_sf.RData corresponds to the spatial dataset necessary to run the supplementary figures about overlapping removals (S9)  


You can also find the object called Subset_lt.RData, which gives the ID of removals for each dataset (single/multiple removals) or subsets of single removals.  

The other RData resulted from the analysis. How to read their names:  



First part:       - Buffer: they link the attacks to removals or of control events.      - Kernel: they give the results of the kernel density estimation (z), according to the spatial (y) and temporal (x) coordinates, for each dataset.  - Int: they give, for each distance and time, the total amount of attack intensities before (INT_BEF) and after (INT_AFT) the combined locations and days of removals or control events. 1 unit of distance = 50 meters, 1 unit of time = 1 day.  - Trend: they give, for each distance and time, the trends in % of the attack intensities when comparing before and after, with their uncertainties and significance. Files with spatshift are designed for figures about spatial shift (unnested scales), contrary to files without spatshift (nested scales).  

Middle parts: (noted with an X after)      - obs: results from removals    - jack: results from jackknife samples of the removals   - ctl: results related to control sets    - cor: results corrected for livestock presence  - raw: results uncorrected for livestock presence  - sim: results for simulated attacks according to livestock presence  


Lengths of lists or sublists correspond to:  

- 20 elements: the two main datasets (single/multiple) and the 18 subsets of single removals. - 100 elements: the 100 control sets.    - 1000 elements: the 1000 simulations of attacks (for the livestock presence correction).   - Other lengths and jack within the name: the jackknife samples.      

Structure of the repository

Code 1: file Buffer.R      

We keep only removals within geographic zones for the analysis (Removal_analyzed_sf), and sample their control events (100 simulations = control sets, Removal_ctl_sf_lt).

We start by delimiting the spatio-temporal buffer for each row of the removal and control datasets.       - We identify the attacks from Attack_sf.RData within each buffer, thanks to the function Buffer_fn, giving the data frames Buffer_X_df (one row per attack)      - We select the pastures from Pasture_sf.RData within each buffer, thanks to the function Buffer_pasture_fn, giving the data frames Buffer_X_sf (one row per removal or control event)  

We calculate the spatial correction:      - We spatially slice each buffer into 200 rings with the function Ring_fn, giving the data frame Ring_sf (one row per ring)      - We add the total pastoral area of the ring of the attack ("SPATIAL_WEIGHT") with the function Spatial_correction_fn, for each attack of each buffer, within Buffer_X_df   

We calculate the pastoral correction:      - We create the pastoral matrix for each removal or control event with the function Pastoral_matrix_fn, giving a matrix of 200 rows (one for each ring) and 180 columns (one for each day, 90 days before the removal date and 90 day after the removal date), with the total pastoral area in use by sheep for each corresponding cell of the matrix (one element per removal, Pastoral_X_mx_lt.RData)      - We simulate, for each removal or control event, the random distribution of the attacks from Buffer_X_df.RData according to Pastoral_X_mx_lt.RData with the function Buffer_sim_fn. The process is done 1000 times (one element per simulation, Buffer_X_sim_lt.RData).   

Code 2: file Kernel.R where we estimate the attack intensities  

We classified the removals into 2 main datasets and 18 subsets, according to part 2.3.4 of the manuscript (Subset_lt.RData) (one element per set).We compute the jackknife samples for each dataset or subset (Removal_id_jack_lt).  We perform the kernel estimations with the function Kernel_fn (Kernel_X_lt).  We sum the intensities of attacks before and after the removals or control events, with the function Intensity_fn, giving Int_X_df_lt.RData.   

Code 3: file Trend.R where we calculate the trends of attack intensities after removals 

 We focus on the nested trends first:      - We calculate them (Trend_X_df) with function Trend_fn     - We set the result significance test by observing the overlapping of confidence intervals of removals and control sets (Trend_X_comparison_df)  

We focus on the spatial shifts (trends for each specific distance):    - We calculate them (Trend_X_spatshift_df) with function Trend_fn      - We set the result significance test by observing the overlapping of confidence intervals of removals and control sets (Trend_X_comparison_spatshift_df)  

- Code 4: file Functions.R where can be found all custom functions called in the other analysis codes   

- Code 5: file Figures.R produces part of the figures from the manuscript

Detailed comments are included in each code.

Support

If you have any question or request, do not hesitate to contact us at: oksana.grente@gmail.com

Authors and acknowledgment

Grente Oksana (CEFE, CNRS), Opitz Thomas (INRAE), Duchamp Christophe (OFB), Drouet-Hoguet Nolwenn (OFB), Chamaillé-Jammes Simon (CEFE, CNRS) and Gimenez Olivier (CEFE, CNRS).  

License

GNU GENERAL PUBLIC LICENSE 3.0