Published May 19, 2025 | Version v1
Dataset Open

Data and Replication Code for An expanding human footprint will escalate human-elephant conflict in a Southern African landscape through the end of the century

Description

In this study, we assess the drivers and determinants of human-elephant conflict (HEC) in Namibia using a rigorously-vetted dataset that tracks conflict events from 2004-2020 across Namibia’s communal conservancies. We use fixed-effects and random-effects regressions to identify causal relationships of weather, vegetation greenness, population and land cover change on HEC and model these out through the end of the century. Additionally, we employ a maximum entropy (MaxEnt) approach to predict the probability of HEC across northern Namibia and identify the spatial patterns of HEC.


Regression Analysis

HEC_Regressions:
Dataset Prep

├── regression_script0_input
├── regression_script0_output
├── regression_script1_input
├── regression_script1_output
├── regression_script2_input
├── regression_script2_output
├── regression_script3_input
├── regression_script3_output
├── regression_script4_input
├── regression_script4_output
├── regression_script5_input
├── regression_script5_output
├── regression_script6_input


Maxent

All data and code for the MaxEnt modeling of human-elephant conflict (HEC) is organized in the following structure. Data includes shapefiles (.shp), rasters (.tif), CSVs (.csv), and RData files (.rda). The code (`maxent/scripts/`) is organized in Quarto markdown documents (.qmd) that can be run to reproduce the analysis.

maxent/
├── data/
│   ├── inputs/
│   │   ├── background_sampling/
│   │   │   ├── all_namib_cons_grid_mask/                   # Mask (.shp) used for bg sampling
│   │   │   ├── hec_occurrences_p/                          # HEC occurrences (.shp) used for bg sampling
│   │   │   ├── hec_reporting_communal_conservancies_ext/   # Extent (.shp) used for bg sampling
│   │   │   ├── hec_sznyr_ratios_updated/                   # HEC ratios (.csv) used for bg sampling
│   │   │   ├── regression_csv/                             # Regression data (.csv) used for bg sampling
│   │   ├── chen_future_LC/
│   │   │   ├── Chen_LC_percent_cover/
│   │   │   │   ├── ssp126/                                 # Chen LC (% cover) projections under ssp126 (.tif)
│   │   │   │   ├── ssp245/                                 # Chen LC (% cover) projections under ssp245 (.tif)
│   │   │   │   ├── ssp370/                                 # Chen LC (% cover) projections under ssp370 (.tif)
│   │   │   │   ├── ssp585/                                 # Chen LC (% cover) projections under ssp585 (.tif)
│   │   │   ├── Global_PFT_projections/                     # Raw global PFT projections from Chen et al., 2022
│   │   ├── environmental_data_extraction/
│   │   │   ├── distance_rasters/                           # Distance to core areas, rivers, fences, and roads (.tif)
│   │   │   ├── dry_szn/                                    # Dry season pr, tas, EVI, SPEI (.tif)
│   │   │   ├── land_cover/                                 # % built, cropland, grassland, shrub, tree, water (.tif)
│   │   │   ├── pop_density/                                # Population density (.tif)
│   │   │   ├── terrain/                                    # Elevation, slope, aspect (.tif)
│   │   │   ├── wet_szn/                                    # Wet season pr, tas, EVI, SPEI (.tif)
│   │   ├── hec_occurrences/
│   │   │   └── indv_crop_raiding_centroids/                # HEC occurrences (.shp) used for MaxEnt modeling
│   │   ├── prediction_rasters/
│   │   │   ├── baseline_2020_with_spei/
│   │   │   │   ├── dry_szn/                                # 2020 dry season predictor variables (.tif)
│   │   │   │   └── wet_szn/                                # 2020 wet season predictor variables (.tif)
│   │   │   └── future/
│   │   │       ├── dry_szn/
│   │   │       │   ├── 2025/
│   │   │       │   │   ├── ssp126/                         # 2025 dry season, ssp126 predictor variables (.tif)
│   │   │       │   │   ├── ssp245/                         # 2025 dry season, ssp245 predictor variables (.tif)
│   │   │       │   │   ├── ssp370/                         # 2025 dry season, ssp370 predictor variables (.tif)
│   │   │       │   │   └── ssp585/                         # 2025 dry season, ssp585 predictor variables (.tif)
│   │   │       │   ├── 2055/
│   │   │       │   │   ├── ssp126/                         # 2055 dry season, ssp126 predictor variables (.tif)
│   │   │       │   │   ├── ssp245/                         # 2055 dry season, ssp245 predictor variables (.tif)
│   │   │       │   │   ├── ssp370/                         # 2055 dry season, ssp370 predictor variables (.tif)
│   │   │       │   │   └── ssp585/                         # 2055 dry season, ssp585 predictor variables (.tif)
│   │   │       │   └── 2085/
│   │   │       │       ├── ssp126/                         # 2085 dry season, ssp126 predictor variables (.tif)
│   │   │       │       ├── ssp245/                         # 2085 dry season, ssp245 predictor variables (.tif)
│   │   │       │       ├── ssp370/                         # 2085 dry season, ssp370 predictor variables (.tif)
│   │   │       │       └── ssp585/                         # 2085 dry season, ssp585 predictor variables (.tif)
│   │   │       └── wet_szn/
│   │   │           ├── 2025/
│   │   │           │   ├── ssp126/                         # 2025 wet season, ssp126 predictor variables (.tif)
│   │   │           │   ├── ssp245/                         # 2025 wet season, ssp245 predictor variables (.tif)
│   │   │           │   ├── ssp370/                         # 2025 wet season, ssp370 predictor variables (.tif)
│   │   │           │   └── ssp585/                         # 2025 wet season, ssp585 predictor variables (.tif)
│   │   │           ├── 2055/
│   │   │           │   ├── ssp126/                         # 2055 wet season, ssp126 predictor variables (.tif)
│   │   │           │   ├── ssp245/                         # 2055 wet season, ssp245 predictor variables (.tif)
│   │   │           │   ├── ssp370/                         # 2055 wet season, ssp370 predictor variables (.tif)
│   │   │           │   └── ssp585/                         # 2055 wet season, ssp585 predictor variables (.tif)
│   │   │           └── 2085/
│   │   │               ├── ssp126/                         # 2085 wet season, ssp126 predictor variables (.tif)
│   │   │               ├── ssp245/                         # 2085 wet season, ssp245 predictor variables (.tif)
│   │   │               ├── ssp370/                         # 2085 wet season, ssp370 predictor variables (.tif)
│   │   │               └── ssp585/                         # 2085 wet season, ssp585 predictor variables (.tif)
│   ├── intermediate/
│   │   ├── background_points/
│   │   │   ├── bg_points_extracted_crop_maxent             # Bg points (.csv & .shp) w/ env data extracted
│   │   │   └── hec_sznyr_bg_points                         # Bg points (.csv & .shp) w/o env data extracted
│   │   └── extracted_hec_occ_sznyr_crop/
│   │       └── hec_occ_points_extracted_crop_maxent        # HEC occurrences (.csv & .shp) w/ env data extracted
│   ├── outputs/
│   │   ├── ENMevaluation/
│   │   │   ├── dry_szn/
│   │   │   │   └── max_eval_dry_4-23-25.rda                # ENMevaluation object for dry szn CR MaxEnt model
│   │   │   └── wet_szn/
│   │   │       └── max_eval_wet_4-23-25.rda                # ENMevaluation object for wet szn CR MaxEnt model
│   │   ├── maxent_model_objects/
│   │   │   ├── dry_szn/
│   │   │   │   └── maxent_cropConf_dryszn_sdm.rda          # MaxEnt model object for dry szn CR HEC
│   │   │   └── wet_szn/
│   │   │       └── maxent_cropConf_wetszn_sdm.rda          # MaxEnt model object for wet szn CR HEC
│   │   └── maxent_predictions/
│   │       ├── baseline/
│   │       │   ├── dry_szn/                                # Continuous HEC predictions (.tif) in 2020 dry szn
│   │       │   └── wet_szn/                                # Continuous HEC predictions (.tif) in 2020 wet szn
│   │       └── future/
│   │           ├── dry_szn/
│   │           │   └── continuous_predictions/             # Continuous future dry szn predictions (.tif)
│   │           └── wet_szn/
│   │               ├── binary_predictions/                 # Binary future wet szn predictions (.tif)
│   │               ├── continuous_predictions/             # Continuous future wet szn predictions (.tif)
│   │               └── difference_maps/
│   │                   ├── binary/                         # Binary difference maps (.tif): 2025 vs 2055, 2085
│   │                   ├── continuous/                     # Continuous difference maps (.tif): 2025 vs 2055, 2085
│   │                   └── persistent_hotspots/            # Persistent hotspot/coldspot maps (.tif)
├── scripts/
│   ├── 01_maxent_extract_occ_env_data_CR.qmd               # Extract env data to HEC occurrences
│   ├── 02_maxent_generate_bg_points_CR.qmd                 # Generate bg points
│   ├── 03_maxent_extract_bg_env_data_CR.qmd                # Extract env data to bg points
│   ├── 04_maxent_predictions_CR.qmd                        # Model evaluation, run MaxEnt, make predictions
│   ├── 05_maxent_prediction_plotting_CR.qmd                # Plot binary/continuous predictions
│   └── maxent_pred_env_data_prep_CR.qmd                    # Prepare env data for predictions

 

Files

maxent.zip

Files (4.2 GB)

Name Size Download all
md5:058091b76ebe02d265325686680a0e38
2.2 GB Preview Download
md5:58910a0f4d78a41620ff1371fd8d7e6e
2.0 GB Preview Download

Additional details

Software

Programming language
R , RMarkdown