The phenometrics used in this paper were derived from the work of Belitz et al. "Phenological research based on natural history collections: practical guidelines and a Lepidopteran case study". We have kept the scripts and code from this effort and added in new analyses focused on the importance of extreme/anomalous weather. This forms the basis for a new manuscript entitled "Extreme Warm and Cold Act Synergistically to Extend Flight Duration in Lepidopterans"
If you download or clone this repository, you can fully replicate Belitz et al. and Guralnick et al. The entire workflow can also be reproduced if you download and unzip the raw occurrence records from our OSF project (https://osf.io/wdzay/). These zip files should be unzipped into the /data subdirectory for scripts to run properly.
Contains csv of climate data used at our cell basis for modeling.
Contains .tif file that has the mean beginning date of the frost free period across north america. Used to caclulate our seasonality trait.
Contains "model dataframes" that were used in statistical analyses.
- mdf.csv is a csv with estimated phenology metrics but outliers remain.
- mdf_removeOutliersResiduals.csv has the outliers removed from mdf.csv.
- mdf_removeOutliersResiduals_wSeasonality.csv has the outliers removed and the seasonality trait calculated. This is the dataset used in our statistical analyses.
Contains .csv and .tre files used to generate phylogy used in analses. insect_tree_wBranches.tre is the tree used in analyses.
Contains .csvs used to generate species list and associated traits.
Script used to build phylogeny. Note script will not run on Windows. Successfully run on a linux machine.
Scripts used to clean data prior to analyses, listed in sequential order. Between Step 03 and 04, phenoestimates were made using the scripts/phenoEstimates/generate_phenometrics_try2.R script.
Scripts used to make manuscript figures. Interaction figures were made by first making individual interaction plots using the /scripts/figures/interactionScripts_revision scripts.
Script to generate phenological estimates. Note this would take a long time to run locally. I ran this script on a 64GB & 40 core linux cluster.
Scripts used to generate LMMs and PLMMs used in manuscript.
Csv that saves the output of the script used to generate phenometrics.
.Rdata of single interaction figures. Running the scripts to make single interaction figures takes some time, so figures with interactions were made by calling in these .Rdata files.