This READme.txt file was generated on October, 2024 by Fabiola Iannarilli ------------------- GENERAL INFORMATION ------------------- 1. Title: Data, R Code, and Output Supporting: A “How-to” Guide for Estimating Animal Diel Activity Using Hierarchical Models 2. Author Information Name: Fabiola Iannarilli Institution: Department of Fisheries, Wildlife, and Conservation Biology University of Minnesota-Twin Cities Address: St. Paul, Minnesota, USA Email: fabiola.iannarilli [at] gmail.com ORCID: https://orcid.org/0000-0002-7018-3557 Name: Brian D. Gerber Institution: U.S. Geological Survey, Colorado Cooperative Fish and Wildlife Research Unit and Department of Fish, Wildlife, and Conservation Biology, Colorado State University Address: Fort Collins, Colorado 80523-1484 USA Email: brian.gerber [at] colostate.edu ORCID: https://orcid.org/0000-0001-9285-9784 Name: John Erb Institution: Minnesota Department of Natural Resources Northeastern Region Headquarters Address: Grand Rapids, Minnesota, USA Email: john.erb [at] state.mn.us ORCID: Name: John R. Fieberg Institution: Department of Fisheries, Wildlife, and Conservation Biology University of Minnesota-Twin Cities Address: University of Minnesota-Twin Cities, St. Paul, Minnesota, USA Email: jfieberg [at] umn.edu ORCID: https://orcid.org/0000-0002-3180-7021 3. Date of data collection: May 2016 - July 2018 4. Geographic location of data collection: Northeastern Minnesota, USA 5. Information about funding sources that supported the collection of the data: This project was funded by the Minnesota Department of Natural Resources and the Wildlife Restoration Program (Pittman-Robertson). ------------------- DIRECTORY STRUCTURE ------------------- | 01-SimulatedData.Rmd # file to generate tutorial on variability in animal diel activity patterns based on simulations | 02-EstimatingAP.Rmd # file to generate tutorial on estimating animal diel activity patterns using hierarchical models (simulated data) | 03-DataPrep.Rmd # file to generate tutorial on formatting data to estimate animal diel activity patterns using hierarchical models (empirical data) | 04-UniVSBimodal.Rmd # file to generate tutorial on exploring unimodal, bimodal, and cathemeral patterns in animal diel activity using hierarchical models (empirical data) | 05-IntroToCovs.Rmd # file to generate tutorial on exploring effects of covariate on animal diel activity patterns using hierarchical models (empirical data) | 06-SpeciesInteractions.Rmd # file to generate tutorial on exploring effects of coccuring species on animal diel activity patterns using hierarchical models (empirical data) | 07-CondVSMarg.Rmd # file to generate tutorial on estimating conditional and marginal animal diel activity patterns using hierarchical models (empirical data) | 08-KDEs.Rmd # file to generate tutorial on the use of Kernel Density Estimators (KDEs) to estimate animal diel activity patterns and comparison with estimates based on hierarchical models (empirical data) | Appendix.Rmd # file to generate tutorial containing additional resources related to estimating animal diel activity patterns using hierarchical models | articles.bib # bibtex file containing citation details of articles cited in the Tutorials | book.bib # bibtex file containing citation details of books cited in the Tutorials | DESCRIPTION # additional file containing information to compile the HTML version of the Tutorials | Dockerfile # additional file containing information to compile the HTML version of the Tutorials | grateful-refs.bib # bibtex file containing citation details of all the packages cited in the Tutorials | HMs_Activity.Rproj # R project | index.Rmd # file to generate the information page of the Tutorials | LICENSE # file specifying the license of use | MakeBook.R # file containing code to compile the Tutorials | now.json # additional file containing information to compile the HTML version of the Tutorials | packages.bib # bibtex file containing citation details of the most relevant packages cited in the Tutorials | preamble.tex # additional file containing information to compile the HTML version of the Tutorials | references.Rmd # file to generate the list of reference cited in the Tutorials | style.css # additional file containing information about the style used to create the HTML version of the Tutorials | toc.css # additional file containing information about the style used to create the HTML version of the Tutorials | _bookdown.yml # additional file containing information to compile the HTML version of the Tutorials | _build.sh # additional file containing information to compile the HTML version of the Tutorials | _deploy.sh # additional file containing information to compile the HTML version of the Tutorials | _output.yml # additional file containing information to compile the HTML version of the Tutorials | +---data_input # folder containing input data | CameraTrapProject_CT_data_for_analysis_MASTER.csv # data on camera trap sampling period and additional site covariates | species_records.csv # records of species encounters | +---data_output # folder containig intermediate data output | occasions_cbind_Ursus_americanus_seasons.csv # data on frequency of encounter of American black bear (Ursus americanus) | +---HMsActivity_book # folder containing the HTML files that make the HTML version of the Tutorials | | 404.html # 'Page not found' HTML page | | app.html # HTML version of Appendix.Rmd | | condvsmarg.html # HTML version of 07-CondVSMarg.Rmd | | cov.html # HTML version of 05-IntroToCovs.Rmd | | dataprep.html # HTML version of 03-DataPrep.Rmd | | est.html # HTML version of 02-EstimatingAP.Rmd | | index.html # HTML version of index.Rmd | | kdes.html # HTML version of 08-KDEs.Rmd | | reference-keys.txt # additional file containing information to create the HTML version of the Tutorials | | references.html # HTML version of references.Rmd | | search_index.json # additional file containing information to create the HTML version of the Tutorials | | style.css # additional file containing information about the style used to create the HTML version of the Tutorials | | temppart.html # HTML version of 06-SpeciesInteractions.Rmd | | unibim.html # HTML version of 04-UniVSBimodal.Rmd | | var.html # HTML version of 01-SimulatedData.Rmd | | | +---HMsActivity_files # folder containing the images available in the Tutorials. Naming of the images is based on the name of the relative code chunk in the .Rmd files | | \---figure-html | | app1-1.png | | app2-1.png | | app3-1.png | | bay1-1.png | | cat2b-1.png | | cat5b-1.png | | cat8b-1.png | | compkde4-1.png | | condvsmarg1-1.png | | condvsmarg6n-1.png | | cont1-1.png | | cont4b-1.png | | est10b-1.png | | est11b-1.png | | est3b-1.png | | est7b-1.png | | fit.bayes.cc.4-1.png | | fit.bayes.cc.4-2.png | | fit.bayes.cc.4-3.png | | fit.bayes.cc.4-4.png | | fit.bayes.cc.pred1-1.png | | fit.bayes.cc.pred2-1.png | | fit.bayes.cc.predict3-1.png | | fit.ml.pred3-1.png | | kde3-1.png | | kdedataaggr2, -1.png | | kdedataaggr2-1.png | | kdespkg4, -1.png | | kdespkg4-1.png | | pdf4-1.png | | pdf6-1.png | | pdf8-1.png | | prepkde3-1.png | | sim2d-1.png | | sim3b-1.png | | sim4b-1.png | | temp8b-1.png | | temp9b-1.png | | univsbim7b-1.png | | unnamed-chunk-1-1.png | | | \---libs # additional file containing information to compile the HTML version of the Tutorials | +---anchor-sections-1.1.0 | | anchor-sections-hash.css | | anchor-sections.css | | anchor-sections.js | | | +---gitbook-2.6.7 | | +---css | | | | plugin-bookdown.css | | | | plugin-clipboard.css | | | | plugin-fontsettings.css | | | | plugin-highlight.css | | | | plugin-search.css | | | | plugin-table.css | | | | style.css | | | | | | | \---fontawesome | | | fontawesome-webfont.ttf | | | | | \---js | | app.min.js | | clipboard.min.js | | jquery.highlight.js | | plugin-bookdown.js | | plugin-clipboard.js | | plugin-fontsettings.js | | plugin-search.js | | plugin-sharing.js | | | \---jquery-3.6.0 | jquery-3.6.0.min.js | +---HMsActivity_files # folder containing the images available in the Tutorials. Naming of the images is based on the name of the relative code chunk in the .Rmd files | \---figure-html | app1-1.png | app2-1.png | app3-1.png | bay1-1.png | cat2b-1.png | cat5b-1.png | cat8b-1.png | compkde4-1.png | condvsmarg1-1.png | condvsmarg6n-1.png | cont1-1.png | cont4b-1.png | est10b-1.png | est11b-1.png | est3b-1.png | est7b-1.png | fit.bayes.cc.4-1.png | fit.bayes.cc.4-2.png | fit.bayes.cc.4-3.png | fit.bayes.cc.4-4.png | fit.bayes.cc.pred1-1.png | fit.bayes.cc.pred2-1.png | fit.bayes.cc.predict3-1.png | fit.ml.pred3-1.png | kde3-1.png | kdedataaggr2-1.png | kdespkg4-1.png | pdf4-1.png | pdf6-1.png | pdf8-1.png | prepkde3-1.png | sim2d-1.png | sim3b-1.png | sim4b-1.png | temp8b-1.png | temp9b-1.png | univsbim7b-1.png | unnamed-chunk-1-1.png | +---ms_figures # folder containing figures reported in Iannarilli et al. (2024) | Fig1_Site_Variability_in_Activity_bimodal.jpg # figure 1 in Iannarilli et al. (2024) | Fig2_Uni_vs_Bim_comparison.jpg # figure 2 in Iannarilli et al. (2024) | Fig3_KDEs_HMs_comparison.jpg # figure 3 in Iannarilli et al. (2024) | Fig4_Site_specific_estimates.jpg # figure 4 in Iannarilli et al. (2024) | Fig5_Coyote_Wolf_patterns.jpg # figure 5 in Iannarilli et al. (2024) | \---source_functions sim_activity.R sim_to_minute.R -------------------------- SHARING/ACCESS INFORMATION -------------------------- 1. Licenses/restrictions placed on the data: These data are protected under a Creative Commons Attribution-NonCommercial-ShareAlike International 4.0 license. 2. Links to publications that cite or use the data: Iannarilli, F., Gerber, B. D., Erb, J., and Fieberg, J. R. (2024). A “How-to” Guide for Estimating Animal Diel Activity Using Hierarchical Models. Journal of Animal Ecology. 3. Recommended citation for the data: Iannarilli, F., Gerber, B. D., Erb, J., and Fieberg, J. R. (2024). Data, R Code, and Output Supporting: A “How-to” Guide for Estimating Animal Diel Activity Using Hierarchical Models Retrieved from the Data Repository for the University of Minnesota. --------------------- DATA & FILE OVERVIEW --------------------- File List The compressed folder 'HMs_Activity.zip' contains data, scripts, and relative output files (figures and html files) to reproduce figures and results reported in Iannarilli et al. (2024) and create Tutorials that provide step-by-step instructions on how to implement the proposed methods. A dynamic version of this material is available at https://github.com/FabiolaIannarilli/HMs_Activity. An HTML version is available at: https://hms-activity.netlify.app/ We recommend users to unzip the folder in the desired working directory and use the R user interface RStudio (RStudio Team 2024) to reproduce the analysis. Clicking the 'HMs_Activity.Rproj' file will directly open the RStudio interface and will allow users to navigate through the different scripts and select the code to reproduce the analysis and build the Tutorials. More information on how to use a project in RStudio are available at: https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects. To compile either the whole book or specific chapter, please use the code available in the file MakeBook.R, contained in the main folder. Please note that several of the models take time to run and the compilation process may take several hours. Below, details on the files contained in the compressed folder: 1. The subfolder 'data_input' contains: A. CameraTrapProject_CT_data_for_analysis_MASTER.csv: data set listing period of active sampling for each of the 100 locations and sampling sessions. column 1: Row counter. column 2: Session. Sampling period in which the encounter occurred. 5 levels: Spring2016, Fall2016, Spring2017, Fall2017, Spring2018. Spring sessions ran between the beginning of May and the end of July of each year; Fall sessions started at the beginning of September and finished at the end of October. column 3: Site. Camera-trap location unique ID. column 4: Date_setup. Start of sampling period for the specific Site-Session (format: MM/DD/YYYY). column 5: Date_retr. End of sampling period for the specific Site-Session (format: MM/DD/YYYY). column 6: Problem1_from. Date in which a camera started malfunctioning at the specific Site-Session (format: MM/DD/YYYY). column 7: Problem1_to. Date in which a camera stopped malfunctioning at the specific Site-Session; corresponds to date of retrieval, 'Date_retr' (format: MM/DD/YYYY). column 8: ghm. Value of the Global Human Modification of Terrestrial Systems (Kennedy 2019, 2020) at each location sampled. B. species_records.csv: data set listing encounter events by species, day, and locations for camera-trap data collected at 100 locations in Northern Minnesota between May 2016 and July 2018 by the Minnesota Department of Natural Resources. For additional details about data collection see Methods section in Iannarilli et al. (2024). column 1: X. Row counter. column 2: Station. Camera-trap location unique ID. Equivalent to Site in file 'CameraTrapProject_CT_data_for_analysis_MASTER.csv'. column 3: Species. column 4: DateTimeOriginal. Date and time of the encounter (format: YYYY-MM-DD HH:mm). column 5: Date. Date of the encounter (format: YYYY-MM-DD). column 6: Time. Time of the encounter (format: HH:mm:ss). column 7: Session. Sampling period in which the encounter occurred. 5 levels: Spring2016, Fall2016, Spring2017, Fall2017, Spring2018. Spring sessions ran between the beginning of May and the end of July of each year; Fall sessions started at the beginning of September and finished at the end of October. 2. The subfolder 'data_output' contains: A. occasions_cbind_Ursus_americanus_seasons.csv: an intermediate output to reduce computational time. The dataset reports the number of successes (i.e. at least an encounter) and failures (i.e. zero encounter) of Black bear (Ursus americanus) at each combination of Site and hourly interval in Spring and Fall. column 1: Row counter. column 2: Site. Camera-trap location unique ID. column 3: Time. Hourly intervals, from 0 (i.e. from 00:00:00 to 00:59:59) to 23 (i.e. from 23:00:00 to 23:59:59). column 4: Season. Spring (S) and Fall (F). column 5: success. Number of days with at least one encounter for a specific Site-Season combination. column 6: failure. Number of days with zero encounters for a specific Site-Season combination. 3. The subfolder 'ms_figures' contains the five figures included in Iannarilli et al. (2024). The figures were created running the code reported in the Rmd scripts files contained in the main folder. Each figure is in a .jpg format and labelled based on its reference in the manuscript (e.g. 'Fig1_Site_Variability_in_Activity_bimodal.jpg' is the Figure 1 in the manuscript). 4. The subfolders 'HMsActivity_book' and 'HMsActivity_files' contains the html files and outputs (including plots stored in the associated folder 'HMsActivity_files\figure-html') associated with the Rmd scripts included in the main folder. 5. The subfolder 'source_functions' contains two custom-built functions, 'sim_activity.R' and 'sim_to_minute.R', necessary to run the code. 6. .Rmd files: "index.Rmd", "01-SimulatedData.Rmd", "02-EstimatingAP.Rmd", "03-DataPrep.Rmd", "04-UniVSBimodal.Rmd", "05-IntroToCovs.Rmd", "06-SpeciesInteractions.Rmd", "07-CondVSMarg.Rmd", "08-KDEs.Rmd", "Appendix.Rmd", "references.Rmd". These files contain text that provides step-by-step explanations on the methods described in the Tutorials and in Iannarilli et al. (2024); they also include code to reproduce the relative examples. 7. .bib files: "articles.bib", "book.bib", "grateful-refs.bib", "packages.bib". The files contain citation details (in bibtex format) of the articles, books, and packages cited in the Tutorials. 8. .css files: "style.css", "toc.css". Cascading Style Sheets (CSS) files which specify the presentation and styling of the documents written in a markup language such as HTML or XML. 9. other files: "DESCRIPTION", "Dockerfile", "now.json", "grateful-report.docx", "LICENSE", "_build.sh", "_deploy.sh", "preamble.text", "_bookdown.yml", "_output.yml". Files containing information to compile the Tutorials. ----------------------------------------- References Iannarilli F., Gerber B. D., Erb J., and J. R. Fieberg. 2024. A “How-to” Guide for Estimating Animal Diel Activity Using Hierarchical Models. Journal of Animal Ecology. Iannarilli F., Arnold T. W., Erb J., and J. R. Fieberg. 2019. Using lorelograms to measure and model correlation in binary data: Applications to ecological studies. Methods in Ecology and Evolution. Accepted Author Manuscript. doi:10.1111/2041-210X.13308 Kennedy J. R., Oakleaf C. M., and J. Kiesecker. 2019. “Managing the Middle: A Shift in Conservation Priorities Based on the Global Human Modification Gradient.” Global Change Biology 25 (3): 811–26. https://doi.org/10.1111/gcb.14549. Kennedy J. R., Oakleaf C. M., and J. Kiesecker. 2020. “Global Human Modification of Terrestrial Systems.” https://doi.org/10.7927/edbc-3z60. RStudio Team (2024). RStudio: Integrated Development for R. RStudio, Inc., Boston, MA URL http://www.rstudio.com/ R Core Team. (2024). R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.