DOI: 10.5061/dryad.pk0p2ngww
title: Landscape context affects patch habitat contributions to biodiversity in agroecosystems

description: Effective conservation schemes are needed to advance dual objectives of
 biodiversity conservation and agronomic production in agricultural
 landscapes. Understanding how plant and arthropod taxa respond to both
 local habitat patch characteristics and landscape complexity is crucial
 for planning effective agri-environment schemes. This study investigated
 the relative effects of local (≤ 100 m from patch habitat center) and
 landscape (≤ 5 km from patch habitat center) variables on diversity of
 plants and arthropods within non-crop habitat patches (i) at different
 spatial extents ranging from 0.1 km to 5 km, while (ii) quantifying
 differential effects of local and landscape variables on unique components
 of diversity (i.e. species richness and abundance), and accounting for
 (iii) unique components of landscape extent (0.1, 0.5, 1, 2 and 5 km
 radii) and complexity (i.e. landscape composition and configuration).
 Landscape variables were significantly correlated with local plant and
 arthropod species richness and abundance at all spatial extents.
 Biodiversity responses to landscape variables were largely
 scale-dependent, as pairwise comparisons were significantly different
 between all spatial extents except between 1-km and 2-km extents, and
 correlations were lowest at the 5-km extent. Partial R-squared values for
 predicting local biodiversity were highest when both local and landscape
 variables were included as predictors of species richness and abundance,
 underscoring the importance of considering both local and landscape
 effects on local diversity. Landscape configuration variables accounted
 for more variation in plant and arthropod species richness than
 composition variables. However, models performed best when composition and
 configuration were considered together rather than alone, suggesting that
 both components of landscape complexity should be considered for
 identifying and managing conservation areas in crop fields. Conservation
 schemes that incentivize farmers to create or conserve small patch habitat
 within crop fields may be more effective when combined with
 landscape-scale designs that enhance landscape complexity across the
 Northern Great Plains. Local conservation efforts should be coordinated
 with landscape-level efforts to ultimately enhance biodiversity and
 desired ecosystem service outcomes across agricultural landscapes.
description: This landscape-scale study was conducted within large-scale wheat
 production systems in the Northern Great Plains. To quantify the relative
 importance of local and landscape variables explaining local diversity,
 local response variables and local explanatory variables were collected at
 the local scale, which was defined as ≤ 100 m from the patch habitat, or
 ecological refuge (ER) center. Landscape explanatory variables were
 extracted for spatially nested buffers at the landscape scale, which was
 defined as ≤ 5 km from ER center. As buffers were nested circles rather
 than concentric rings, larger spatial extents included smaller spatial
 extents. At the local spatial extent, arthropod and plant species richness
 and abundance were observed at 20, 40, 60, 80, and 100 m from the center
 of the ER, which included the crop field margin. Percent cover of crop
 field and ER were calculated at each local spatial extent. For landscape
 analysis, five nested circular buffers were created around each ER at
 spatial extents of 0.1, 0.5, 1, 2, and 5 km radii, respectively. Landscape
 composition data, including land cover type diversity, richness, and
 percent cover of each land cover type, and landscape configuration data,
 including cohesion, division, large patch dominance, total edge and number
 of patches, were extracted for every landscape spatial extent.
 Explanatory and response variables observed at the local spatial
 extent for this study included percent cover of ER and crop field, plant
 species richness, plant abundance (i.e. percent cover), arthropod species
 richness, and arthropod abundance within 100 meters from the ER center.
 Local plant percent cover and species richness variables were collected
 along six 100-meter transects in a radial design from the ER center using
 ocular percent canopy cover for each species within
 0.1m<sup>2</sup> circular frames every 20 meters. Ocular
 percent canopy cover was evaluated by averaging two observers’ visual
 estimates of plant percent cover in each sampling frame. Arthropod data
 were collected using sweep net sampling at 20-meter increments along the
 same transects at each site and mean plant species richness and diversity
 were aggregated at the same 20-m scale. In the lab, arthropods were
 divided into taxonomic groups including Orthoptera, Hemiptera, Coleoptera,
 Diptera, Hymenoptera, Araneae, Odonata, and Lepidoptera (Duff, Maxwell,
 and Debinski, 2024). Arthropod individuals were identified as
 morphospecies within each taxonomic group based on visual similarities in
 form and structure and used as a practical surrogate for species
 classification. Plant and arthropod species richness were calculated for
 each 20-meter increment vegetative observation or sweep net sample using
 the <em>vegan</em> package in R (Oksanen et al., 2017).  All
 data from each transect were summed by taxonomic group (plants or
 arthropods) across the two years of data collection, and placed in the
 response variable matrix for analysis. Landscape
 variable data were obtained from the Cropland Data Layer (USDA, 2023) and
 extracted for the five landscape spatial buffers surrounding each
 ER.<em> </em>The variables selected to represent landscape
 compositional heterogeneity in this study were land cover type diversity,
 number of land cover types, and the percent cover of agricultural
 cultivated land, undeveloped land, or developed land within each spatial
 extent. All landscape composition metrics were calculated using the
 <em>vegan</em> package in R (Oksanen et al., 2017). Land cover
 type richness was calculated as species richness, where each land cover
 type was considered a “species” type.  Landcover type diversity was
 calculated using Shannon Diversity Index, where each land cover type was
 considered a “species” type, and pixel abundance was considered as
 “species” abundance (Reynolds et al., 2018). Land cover types were
 manually classified as agricultural land, wildland or developed
 land. The landscape variables selected to represent
 landscape configurational heterogeneity in this study included patch
 cohesion as a metric of connectedness within each spatial extent, patch
 division as a metric of patchiness within each spatial extent, total edge
 amount as a metric of fragmentation within each spatial extent, total
 number of patches as a metric of patchiness within each spatial extent,
 and Large Patch Index as a measure of the percentage of landscape covered
 by the dominant patch type within each spatial extent (McGarigal et al.,
 2012). All landscape configuration metrics were calculated from the
 Cropland Data Layer using the LandscapeMetric package in R (McGarigal et
 al., 2012) at 30-meter (0.09-hectare pixel) resolution<strong>
 </strong>for each landscape extent buffer.
description: # Landscape context affects patch habitat contributions to biodiversity in
 agroecosystems
 [https://doi.org/10.5061/dryad.pk0p2ngww](https://doi.org/10.5061/dryad.pk0p2ngww) Datasets include local biodiversity observations obtained from field surveys and landscape data obtained from the Cropland Data Layer (USDA, 2023). Local variables included percent cover of ecological refuge (ER) and crop field, plant species richness, plant abundance (i.e. percent cover), arthropod species richness, and arthropod abundance within 100 meters from the ER center. All data from each transect were summed by taxonomic group (plants or arthropods) across the two years of data collection, and placed in the response variable matrix for analysis. Local biodiversity datasets were analyzed using the *vegan* package in R. Landscape variable data were obtained from the Cropland Data Layer and extracted for the five landscape spatial buffers surrounding each ER using the *LandscapeMetric* package in R. Landscape variables grouped under landscape composition included land cover type diversity, number of land cover types, and the percent cover of agricultural cultivated land, undeveloped land, or developed land within each spatial extent. Landscape variables grouped under landscape configuration included patch cohesion as a metric of connectedness within each spatial extent, patch division as a metric of patchiness within each spatial extent, total edge amount as a metric of fragmentation within each spatial extent, total number of patches as a metric of patchiness within each spatial extent, and Large Patch Index as a measure of the percentage of landscape covered by the dominant patch type within each spatial extent.  ## Description of the data and file structure Prior to PLS analysis, local and landscape variable data were obtained and analyzed as following: 1\. Obtained local biodiversity data from field surveys in 2020 and 2021 a. Combined local biodiversity data for 2020 and 2021 for all sites b. Subsetted local biodiversity data in nested buffers around each ER (at 20, 40, 60, 80 and 100 m buffers) c. Calculated diversity and richness within each extent using *vegan* package (species richness and Shannon's Diversity) 2\. Obtained landscape scale data from Cropland Data Layer a. Downloaded data from Cropland Data Layer at a 200 km radius each site b. Created nested buffers around each ER at landscape scale (0.1, 0.5, 1, 2, and 5 km buffers) c. Used *LandscapeMetric* package to calculate landscape composition and configuration metrics within each spatial extent 3\. Standardized the combined local and landscape dataset to mean of 0 and variance of 1. **Local Data** Local data included plant and arthropod abundance and species richness sampled in 2020 and 2021 at 20, 40, 60, 80, 100 m buffers from ER center. Local Biodiversity Data Files: Corresponding shapefiles biodiversity and shapefiles for each ER (*Site.Local.Long.csv and Site20m.shp, Site40m.shp*) were not included as they could not be properly anonymized to respect the participating producers' privacy and comply with human subjects data regulations. Certain data may be made available upon request. Code Example for Subsetting Local Biodiversity Data by Local Spatial Buffers: df &lt;- read_excel("LocalSiteData.csv") \#Subset by spatial extent Site20m &lt;- subset(df,df$`EXTENT (m)`==20) Site20m &lt;- Site20m[,2:8] Site40m &lt;- subset(df,df$`EXTENT (m)`==40) Site40m &lt;- Site40m[,2:8] Site60m &lt;- subset(df$`EXTENT (m)`==60) Site60m &lt;- Site60m[,2:8] etc. for 80m and 100m extents. **Landscape Data** Cropland Data Layer Files: *Cropscape_2021_NAD.tif* is a shapefile of 2021 Cropland Data Layer for all crops clipped in a 200 km radius around site 1. *Cropscape_2021_big_UTM.tif* is a shapefile of 2021 Cropland Data Layer for all crops clipped in a 200 km radius around sites 2 and 3. Method for Obtaining Cropland Data Layers:  \#Defined area of interest using "square" tool (defined 200 km radius around the ER) \#Defined year of interest under "layers" tab (selected 2021) \#Selected all crops (value) \#Exported the selected crops from mapping button (downloaded as .tif) **Spatial Buffers** Method for Creating Local Spatial Buffers: Local spatial buffers were manually created around each ER at 20, 40, 60, 80 and 100 m radii and combined into one dataframe in R. Code Example:\ \#20m Buffer Ring \#SiteLocalBuffers &lt;- readOGR('Site20m.shp') \#Site20m &lt;- crop(*Cropscape_2021_NAD.tif*, SiteLocalBuffers) \#Site20m &lt;- mask(Site20m, SiteLocalBuffers) \#40m Buffer Ring SiteLocalBuffers &lt;- readOGR('Site40m.shp') Site40m &lt;- crop(*Cropscape_2021_NAD.tif*, SiteLocalBuffers) Site40m &lt;- mask(Site40m, SiteLocalBuffers) Method for Creating Landscape Spatial Buffers: Spatial buffers were manually created around each ER at 0.1, 0.5, 1, 2, and 5 km radii and combined into one dataframe in R. Shapefiles for each ER (SiteBuffer100m.shp) were not included to respect the participating producers' privacy. Code Example: \#0.1 km buffer ring Sitebuffers &lt;- readOGR('SiteBuffer100m.shp') Site0.1km &lt;- crop(crops2021, Sitebuffers) Site0.1km &lt;- mask(Site0.1km, Sitebuffers) \#0.5 km buffer ring Sitebuffers &lt;- readOGR('SiteBuffer0.5km.shp') Site0.5km &lt;- crop(crops2021, Sitebuffers) Site0.5km &lt;- mask(Site0.5km, Sitebuffers) Land Cover Classification: Land cover types obtained were manually classified from the Cropland Data Layer in R as agricultural land, wild land, or developed land. Code Example: percentage_class_Site0.1km &lt;- as.data.frame(percentage_class_Site0.1km) AGLAND.0.1km &lt;- c(1,4,5,6,12,21,22,23,24,25,27,28,29,30,31,32,33,35,36,37,38,39,41,42,43,44,47,51,52,53,57,58,59,61,66,67,71,205,224,228) WILDLAND.0.1km &lt;- c(111, 112, 131, 141, 142, 143, 152, 176, 190, 195) DEVLAND.0.1km &lt;- c(121, 122, 123, 124) The *vegan* package was used to calculate land cover type species richness and diversity at each extent. Code Example: \#made dataframe with columns: Spatial Extent, Species Richness, Shannon Diversity df.Site0.1km &lt;- cbind.data.frame(0.1, SRSite0.1km, HSite0.1km) names(df.Site0.1km) &lt;- c('radius.km', 'SR', 'ShanDiv') df.Site0.5km &lt;- cbind.data.frame(0.5, SRSite0.5km, HSite0.5km) names(df.Site0.5km) &lt;- c('radius.km', 'SR', 'ShanDiv') etc. for 1, 2 and 5km extents The *LandscapeMetric* package was used to calculate configurational landscape variables at each extent. Code Example for variable COHESION: lsm_l_cohesion(Site0.1km, directions = 8) lsm_l_cohesion(Site0.5km, directions = 8) lsm_l_cohesion(Site1km, directions = 8) lsm_l_cohesion(Site2km, directions = 8) lsm_l_cohesion(Site5km, directions = 8) **Standardizing the Dataset** The local and landscape variables were combined in a dataset and scaled and logged to a mean of 0 and variance of 1. Code Example: \#Standardized  local and landscape dataframes \#Test &lt;- as.data.frame(SiteLanddf[,3:18]) \#SiteLanddfLogged &lt;- log(as.data.frame(Test)) \#SiteLanddfLoggedScaled &lt;- as.data.frame(scale(SiteLanddfLogged)) \#SiteLanddfScaled &lt;- cbind(SiteLanddf[,1:2], SiteLanddfLoggedScaled) Standardized Data File: *AllFarmsScaled.csv* is the combined dataset for all  scaled local and landscape variables for all sites. Variable Description: PLANTSR: Mean plant species richness, or number of plant species recorded within each spatial extent PLANTABUND: Plant abundance, or percent cover of non-crop vegetation within each spatial extent including weeds in the cropped portion FIELD: Percent cover of each spatial extent that was cultivated for crops PATCH: Percent cover of each spatial extent that was semi-natural non-crop patch habitat ARTHSR: Mean arthropod morphospecies richness, or mean arthropod morphospecies richness recorded within each spatial extent ARTHABUND: Mean arthropod abundance, or number of arthropod individuals recorded within each spatial extent LANDDIV: Land cover type diversity within each spatial extent, measured by Shannon Diversity Index LANDRICH: Land cover type richness, or number of land cover types within each spatial extent WILDLAND: Proportion of each spatial extent that was wildland AGLAND: Proportion of each spatial extent that was cultivated agricultural land COHESION: An aggregation metric that characterizes the connectedness of patches belonging to class; i.e. COHESION = 0 was isolated and COHESION = 100 was well-connected DIVISION: An aggregation metric that characterizes the probability that two cells are not located in the same patch class; i.e. DIVISION = 0 if only 1 patch was present and DIVISION = 1 if all patches were single cells TOTALEDGE: An area and edge metric that measures all edges in meters; i.e. TE = 0 if all cells were edge cells; TE increases as landscape becomes more fragmented NP: An aggregation metric that measures the number of patches; i.e. NP = total number of patches in a landscape; i.e. NP increases as landscape becomes more fragmented LPI: A dominance metric that measures the percentage of the landscape covered by the largest patch in the landscape; i.e. LPI = 100 when one patch covers the entire landscape Farm: An ID variable that identifies each site in the dataset i.e. Farm 1, Farm 2, and Farm 3 EXTENT (km): Spatial extent of each spatial buffer; i.e. 0.1 km, 0.5 km, 1km, 2km, and 5km ## Sharing/Access information Cropland data were derived from the following sources: * [https://croplandcros.scinet.usda.gov/](https://croplandcros.scinet.usda.gov/) ## Code/Software PLS analysis were conducted in R. Code may be made available upon request.  Code Example: \#Added plsrLocal (local variables at 0.1 km) and plsr01 (landscape variables at 0.1 km) plsrLocal &lt;- plsr(ARTHSR ~ PLANTSR + PLANTABUND + FIELD + PATCH, ncomp = 4, data = Site05, validation = "LOO") plsr01 &lt;- plsr(ARTHSR ~ LANDDIV + LANDRICH + WILDLAND + AGLAND + DEVLAND + COHESION + DIVISION + TOTALEDGE + NP + LPI, ncomp = 4, data = Site05, validation = "LOO") etc. for each variable combination and  spatial extent at 0.5, 1, 2, and 5 km.