Supplement 1. Code for conducting the analyses and generating the figures in this paper, including the raw data.

<h2>File List</h2><div> <p><a href="hb-migration.r">hb-migration.r</a> (MD5: 1904c1692a02d984890e4575d0eeb4e6)</p> <p>R script that imports the eBird, map, and equal-area icosahedron data, summarizes the population-level migration patterns, runs the statistical analyses, and outputs figures.</p> <p> </p> <p><a href="migration-fxns.r">migration-fxns.r</a> (MD5: a2ae2a47c066a253f18cad5b13cddcf6)</p> <p>R script that holds the relevant functions for executing the hb-migration.R script.</p> <p> </p> <p><a href="BBL-Appendix.r">BBL-Appendix.r</a> (MD5: 370c701d6afb07851907922dcab51de4)</p> <p>R script that imports the Breeding Bird Laboratory data and outputs the figures for the Appendix.</p> <p> </p> <p><a href="output-data.zip">output-data.zip</a> (MD5: 36e3a92a7d35e84b299d82c8bd746950)</p> <p>Folder containing the partially-processed text files (15 .txt files, 3 per species for centroids, migration dates, and migration speed) for the main analyses and figures in the paper. These text files can be used in part II of hb-migration.r and contain output data on the daily population-level centroids, migration dates, and migration speed. Part I of hb-migration.r relies on raw eBird data, which was queried from the eBird server directly. The raw eBird data can be requested through their online portal after making a user account (<a href="http://help.ebird.org/customer/portal/articles/1010524-can-i-download-raw-data-from-ebird-">http://help.ebird.org/customer/portal/articles/1010524-can-i-download-raw-data-from-ebird-</a>). The equal-area icosahedron maps are available at (<a href="http://discreteglobalgrids.org/" target="_blank">http://discreteglobalgrids.org/</a>). The BBL data, used in <a href="BBL-Appendix.R">BBL-Appendix.R</a>, can be requested from the USGS Bird Banding Laboratory (http://www.pwrc.usgs.gov/BBL/homepage/datarequest.cfm).</p> </div><h2>Description</h2><div> <p>The code and data in this supplement allow for the analyses and figures in the paper to be fully replicated using a data set of manipulated communities collected from the literature.</p> <p><i>Requirements: </i>R 3.x, and the following packages: chron, fields, knitr, gamm4, geosphere, ggplot2, ggmap, maps, maptools, mapdata, mgcv, plyr, raster, reshape2, rgdal, Rmisc, SDMTools, sp, spaa, and files containing functions specific to this code (listed above).</p> <p>The analyses can then be replicated by changing the working directory at the top of the file hb-migration.R to the location on your computer where you have stored the .R and .csv files and running the code. Note that to fully replicate the analyses, the data will need to be requested from the sources listed above.</p> <p>Starting at Part II in hb-migration.R, it should take approximately 30 minutes to run all the code from start to finish. Figures should output as pdfs in your working directory. If you download the raw data and run the analyses starting at Part I, you will need a workstation with large memory to run the analyses in a reasonable amount of time since the raw eBird datafiles are very large.</p> <p><i>Version Control Repository: </i>The full version control repository for this project (including post- publication improvements) is publicly available <a href="https://github.com/sarahsupp/hb-migration">https://github.com/sarahsupp/hb-migration</a>. If you would like to use the code in this Supplement for your own analyses it is strongly suggested that you use the equivalent code in the repositories as this is the code that is being actively maintained and developed.</p> <p><i>Data use: </i>Partially-processed data is provided in this supplement for the purposes of replication. If you wish to use the raw data for additional research, they should be obtained from the original data providers listed above.</p> </div>