These scripts, run sequentially, allow the spatial varying models to be recreated using publicly available and author-supplied data as input. 

Author-supplied data are in the Input folder accompanying the scripts.  

(1) COMDYN_01_Tidy_Bird_Data.R

Platform: R and RStudio

Input:
(a) Data from the North American Breeding Bird Survey (BBS) available from https://doi.org/10.5066/P9GS9K64

(2) COMDYN_02_InputFiles.R

Platform: R and RStudio

Input:
(a) Output from COMDYN_01_Tidy_Bird_Data.R
(b) The SpeciesList.txt file from the BBS contains a header making it difficult to read into R. The author
has supplied a version of this file with the header removed called SpeciesListR2023.csv
(c) Partners in Flight. (2024). Avian Conservation Assessment Database, version 2024. available at http://pif.birdconservancy.org/ACAD 

(3) COMDYN_03_Model_Runs_Through_Python.py

Platform: Python

Input: 
To run this script, the user must follow these steps:

(a) Create a Comdyn folder on the C: Drive
(b) Create three sub-folders within the Comdyn folder called: 

---ComdynInput
---ComdynOutput
---ComdynScripts

(c) In the ComdynInput sub-folder, place the output from COMDYN_02_InputFiles.R
(d) In the ComdynOutput sub-folder, place a blank txt file called FailedRecords.txt. This text file
will store the route and years identifying records that failed to run successfully through the COMDYN program
(e) In the ComdynScripts sub-folder, place COMDYN_03_Model_Runs_Through_Python.py

(4) COMDYN_04_Summarise_Output.R

Platform: R and RStudio

Input:
(a) The contents of the Comdyn\\ComdynInput and Comdyn\\ComdynOutput sub-folders created by
COMDYN_03_Model_Runs_Through_Python.py.

(5) GEE_01_Plant_Productivity_Measures.txt

Platform: Google Earth Engine

Input:
Due to memory limitations, this script needs to be run twice to get output for all 39.4-km
buffers of BBS route start points. The user will need to upload two sets of buffers as
Google Earth Engine assets. The author has supplied the buffers as two shapefiles.

(a) RouteBuffersSet1.shp
(b) RouteBuffersSet2.shp 

(6) GEE_02_Land_Cover.txt

Platform: Google Earth Engine

Input:
Due to memory limitations, this script needs to be run twice to get output for all 39.4-km
buffers of BBS route start points. The user will need to upload two sets of buffers as
Google Earth Engine assets. The author has supplied the buffers as two shapefiles. 

The author has also supplied a shapefile representing the boundaries of the conterminous United States (CONUS). 

(a) RouteBuffersSet1.shp
(b) RouteBuffersSet2.shp 
(c) CONUS.shp

(7) GEE_03_Formatting_Output_for_Modeling.R

Platform: R and RStudio

Input:
Compiles output from GEE_01_Plant_Productivity_Measures.txt and GEE_02_Land_Cover.txt. Assumes that
multiple files were created due to the need to processes BBS buffers in two separate sets. The  
output files from GEE_01_Plant_Productivity_Measures.txt should have DHI in the name. Output from
GEE_02_Land_Cover.txt should have LC in the name.

(8) Model_01_SVC.R

Platform: R and RStudio

Input: 
Requires output from COMDYN_04_Summarise_Output.R and GEE_03_Formatting_Output_for_Modeling.R. 
In addition, the author has provided two shapefiles that are required to run the script. One represents
the start points of BBS routes. The other represents the boundaries of the conterminous United States (CONUS).

(a) CONUS.shp
(b) BBSStartPoints.shp 