Skip to content

n-a-gilbert/neon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code for: Idiosyncratic spatial scaling of biodiversity–disease relationships


Authors: Neil A. Gilbert, Graziella V. DiRenzo, Elise F. Zipkin

Please contact the first author for questions about the code or data: Neil A. Gilbert ([email protected])


Information

Repository Type: Program R scripts

Year of Origin: 2024

Year of Version: 2024

Version: 1.0.0

Digital Object Identifier (DOI): https://doi.org/10.5066/P13P2VWG

USGS Information Product Data System (IPDS) no.: IP-165614


Citation for Software

Gilbert, N.A., G. V. DiRenzo, & E. F. Zipkin. 2025. Code for idiosyncratic spatial scaling of biodiversity–disease relationships. Version 1.0.0; U.S. Geological Survey software release. Reston, VA. https://doi.org/10.5066/P13P2VWG


Citation for Associated Manuscript

Gilbert, N.A., G.V. DiRenzo, & E.F. Zipkin. 2025. Idiosyncratic spatial scaling of biodiversity–disease relationships. Ecography.


Repository description

This repository contains data and code supporting the Gilbert et. al (2025). The objective of the paper is to evaluate how estimated relationships between Lyme disease risk and host biodiversity change when host biodiversity is quantified at different spatial scales. Data come from the National Ecological Observatory Network's small mammal monitoring program. Data are freely available at the NEON Data Portal and are provided in this repository for ease of reproducing analyses. The code (see Repository Directory below) includes scripts to format data, fit models, interpret results, and create figures.


Manuscript Abstract

Host biodiversity is hypothesized to dilute the risk of vector-borne diseases because many host species are “dead ends” which cannot effectively transmit the disease to other individuals. However, many studies on biodiversity–disease relationships characterize host biodiversity at single, local spatial scales, which complicates efforts to forecast disease risk if associations between host biodiversity and disease change with spatial scale. Here, our objective was to evaluate the spatial scaling of relationships between host biodiversity and Borrelia infection prevalence in small mammals; Borrelia is a bacterial taxon which causes Lyme disease, a zoonotic disease affecting >400,000 people in the United States annually. We compared the associations between infection prevalence and small mammal host diversity for local communities (individual plots) and metacommunities (multiple plots aggregated within a landscape) sampled by the National Ecological Observatory Network, an emerging continental-scale environmental monitoring program with a hierarchical sampling design. We applied a multispecies, spatially-stratified capture–recapture model to a trapping dataset to estimate five small mammal biodiversity metrics, which we used to predict infection status for a subset of trapped individuals. We found that relationships between Borrelia infection prevalence and biodiversity did indeed vary when biodiversity was quantified at the different spatial scales, and that these scaling behaviors were idiosyncratic among the five biodiversity metrics. For example, species richness of local communities showed a negative (dilution) effect on infection prevalence, while species richness of the small mammal metacommunity showed a positive (amplification) effect on infection prevalence. In contrast, total abundance of the local community showed a negative (dilution) effect on infection prevalence, while total abundance of the metacommunity showed no association with infection prevalence. Our modeling approach can inform future analyses as data from similar monitoring programs accumulate and become increasingly available through time. Our results indicate that a focus on single spatial scales when assessing the influence of biodiversity on disease risk provides an incomplete picture of the complexity of disease dynamics in ecosystems.

Repository Directory

code: Contains code for downloading, formatting, analyzing, and visualizing data

data: Contains data for analyses

  • range_maps Folder with IUCN range maps for the species included in the analysis

  • NEON_canopy_all_sites.csv Mean % canopy cover (NLCD) within a 500 m buffer of NEON plot (calculated from Google Earth Engine). Has columns for NEON siteID, plotID, and "mean", which is the mean % canopy cover

  • PanTHERIA_1-0_WR05_Aug2008.txt PanTHERIA database

  • disease_with_biodiversity_metrics_v01.csv Formatted infection presence / host biodiversity data. Metadata information below

    Variable name Meaning
    siteID NEON site (text)
    site NEON site (numeric)
    plotID NEON plot (text)
    plot NEON plot (numeric)
    period Trapping bout
    scientificName Scientific name of individual screened for Borrelia infection
    sp Species numeric code for individual screened for Borrelia infection
    tagID Unique identifier for individual small mammal
    positive Indicates whether or not individual tested positive for Borrelia (1) or not (0)
    type Indicates sample type (ear tissue, blood, or both)
    sr_site_mean Posterior mean of species richness for the entire NEON site
    sr_site_sd Posterior standard deviation of species richness for the entire NEON site
    sr_plot_mean Posterior mean of species richness for NEON plot
    sr_plot_sd Posterior standard deviation of species richness for NEON plot
    pd_site_mean Posterior mean of Peromyscus dominance for the entire NEON site
    pd_site_sd Posterior standard deviation of Peromyscus dominance for the entire NEON site
    pd_plot_mean Posterior mean of Peromyscus dominance for NEON plot
    pd_plot_sd Posterior standard deviation of Peromyscus dominance for NEON plot
    n_site_mean Posterior mean of total abundance for the entire NEON site
    n_site_sd Posterior standard deviation of total abundance for the entire NEON site
    n_plot_mean Posterior mean of total abundance for NEON plot
    n_plot_sd Posterior standard deviation of total abundance for NEON plot
    shan_site_mean Posterior mean of Shannon diversity for the entire NEON site
    shan_site_sd Posterior standard deviation of Shannon diversity for the entire NEON site
    shan_plot_mean Posterior mean of Shannon diversity for NEON plot
    shan_plot_sd Posterior standard deviation of Shannon diversity for NEON plot
    faith_site_mean Posterior mean of phylogenetic diversity (abundance-weighted Faith index) for the entire NEON site
    faith_site_sd Posterior standard deviation of phylogenetic diversity (abundance-weighted Faith index) for the entire NEON site
    faith_plot_mean Posterior mean of phylogenetic diversity (abundance-weighted Faith index) for NEON plot
    faith_plot_sd Posterior standard deviation of phylogenetic diversity (abundance-weighted Faith index) for NEON plot
  • neon_cr_data_2024-08-27.RData Formatted data ready to go into model; .RData object with four items

    • constants Constants for model
    Variable name Meaning
    nsp Number of species
    nsite Number of NEON sites
    max_plot Matrix reporting the maximum number of plots trapped for a site-bout combination
    M Total number of individuals (real and augmented) for each site-species combination
    max_period Vector reporting the maximum trapping bout trapped for each site
    nz Number of "latent existence states"
    species_z Species identifier used for indexing in z loop
    site_z Site identifier used for indexing in z loop
    period_z Period identifier used for indexing in z loop
    max_plot_z Identifier for maximum plot for indexing in z loop
    ny Length of detection/nondetection data loop
    species_y Species identifier used for indexing in y loop
    z_index Indexes latent Z state within the y loop
    • data Data for model
    Variable name Meaning
    y Vector of detection-nondetection data (capture history)
    TMIN Minimum temperature on day of trapping (z-standardized)
    PRCP Precipitation on the day of trapping (z-standardized)
    in_range Matrix reporting whether (1) or not (0) a NEON site falls within the range of a given species
    plot Plot identifier for where an individual was trapped (NA for augmented individuals)
    CANOPY Matrix with mean percent canopy cover within a 500 m radius of the center of the NEON plot (z-standardized)
    • final Dataframe from which some of the data and constants are pulled
    Variable name Meaning
    siteID NEON site (character)
    period Trapping bout identifier (numeric)
    rep Replicate trapping night within bout (numeric
    scientificName Scientific name of individual
    ind Identifier for individual (numeric)
    plotID NEON plot (character)
    tagID Identifier for individual (NA for augmented individuals)
    y Vector of detection-nondetection data (capture history)
    positive Indicates whether Borrelia infection was detected
    type Indicates sample type (ear, blood, or both)
    path Indicates which Borrelia taxon was detected (Borrelia spp. only or Borrelia spp. + Borrelia burgdorferi)
    year Year of trapping
    month Month of trapping
    day Day of trapping
    prcp Precipitation (mm) on the day of trapping
    tmin Minimum temperature (C) on day of trapping
    plots_sampled list-column reporting which plots were sampled during the given period
    plot Plot identifier for where individual was trapped (NA for augmented individuals
    site Site identifier (numeric)
    sp Species index (numeric)
    plotst Starting value for plot (known for trapped individuals; randomly assigned for augmented
    z_index Index for the latent-z state for an individual-bout combination
    max_plot Maximum plot trapped during a given bout
    in_range Binary variable reporting whether (1) or not (0) a NEON site falls within the range of a given species
    • get_z_index Dataframe from which ssome of the data and constants are pulled. Simplified version of final without replicate information
    Variable name Meaning
    siteID NEON site (character)
    site NEON site index (numeric)
    period Trapping bout identifier (numeric)
    sp Species index (numeric)
    scientificName Scientific name of individual
    ind Identifier for individual (numeric)
    plotID NEON plot (character)
    plot Plot identifier for where individual was trapped (NA for augmented individuals
    plots_sampled list-column reporting which plots were sampled during the given period
    plotst Starting value for plot (known for trapped individuals; randomly assigned for augmented
    z_index Index for the latent-z state for an individual-bout combination
    max_plot Maximum plot trapped during a given bout

figures: Contains figures and code for creating figures

results: Contains results files

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages