DOI: 10.6084/m9.figshare.24040488
title: Data and code from "Variable spatiotemporal ungulate behavioral response to predation risk"

description: # Data from 'Variable spatiotemporal ungulate behavioral response to predation risk'<br># Sarah L. Schooler, Nathan J. Svoboda, Kenneth F. Kellner, Ge Pu, Shannon P. Finnegan, Jerrold L. Belant# Ecosphere. 2024.<br># Corresponding author: Sarah L. Schooler; sarahlschooler AT gmail.com<br>## Description of the data and file structureThe data files are spatial data in the form of raster files (TIF) used as covariates in habitat suitability and movement models for elk and brown bear. Raster files named as #YEAR#_P_prj.tif, #YEAR#_S_prj.tif, and #YEAR#_A_prj.tif are NDVI files for each year-season combination. These are composites with clouds removed generated for each season using Google Earth Engine and Landsat 8 data [code to generate these composites is provided]. Raster files elevation.tif and slope.tif are predictor rasters were generated from a 30-m digital elevation model in ArcGIS. Raster files coastdist.tif and anadwaterdist.tif are predictor rasters for distance from coasts (from outline of Afognak and Raspberry islands) and distance from anadromous fish-bearing streams (from ADFG 2023 Anadromous Waters Catalog). Raster file LCTimber2016_forrisk.tif is NLCD landcover data updated with timber harvest data and recategorized as described in the manuscript. Raster files bearpred_#SEASON#_rast.tif are projected rasters of predicted bear probability of use created in bear_analysis.R and used in elk analyses. File LCCat_risk.csv is a reference file to convert the numeric landcover raster to named lancover type. File sunrise_set.csv is sunrise, sunset, and civil twilight times in Kodiak, Alaska, USA (from in-the-sky.org) for time of day categorization.The code files are either program R code for data formatting, habitat suitability and movement models, and plots for the associated manuscript, or text (.txt) files for the Google Earth Engine code to create NDVI composite images.## Sharing/Access informationSee associated manuscript for information about how data was derived.## Code/SoftwareMany packages will be required within program R. Please install any packages that are required within the code to run code. Please use the r project file (Schooleretal2024_ElkRiskResp) to ensure code works correctly.# Run the code in order:NDVI:<br>Use the Google Earth Engine coding environment to run files NDVI_GEE_H, NDVI_GEE_P, and NDVI_GEE_S. You will have to change the dates for each year processed. This is not necessary to run the following code, as the NDVI data files for each season-year are provided.<br>Analysis:<br>1. (Optional) Clean up and thin bear data, generate random points, create bear habitat selection models, check model fit, create projected bear probability of use rasters, and create plots in manuscript: bear_analysis.R2. Clean up and thin elk data, generate random points, create elk habitat selection models, check model fit, create projected probability of use rasters, and create plots in manuscript: elk_habitat_analysis.R<br>3. Re-process elk data to extract movement speed, thin data, create elk movement models, check model fit, and create plots in manuscript: Run bear habitat models and create projected suitability rasters: elk_movement_analysis.R