Last updated: 2024-08-19

Checks: 2 0

Knit directory: Energy-Budget-Model/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 1a259c8. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.Rhistory
    Ignored:    code/.Rhistory
    Ignored:    output/.Rhistory

Unstaged changes:
    Modified:   analysis/_site.yml
    Modified:   code/0-disp-workflowr-script.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/about.Rmd) and HTML (docs/about.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 1a259c8 biowilks 2024-08-19 Build site.
Rmd f37bb23 biowilks 2024-08-19 Publishing Energy Budget Model website
html 52853f2 biowilks 2024-08-19 Build site.
html b5075e9 biowilks 2024-08-19 Build site.
html 39b2665 biowilks 2024-08-19 Build site.
Rmd 9b23439 biowilks 2024-08-19 wflow_git_commit(all = TRUE)
html 9b23439 biowilks 2024-08-19 wflow_git_commit(all = TRUE)
html 5262580 Wilkinson 2024-04-15 Updating files
Rmd a307f19 biowilks 2024-04-15 Start workflowr project.

From traits to travel: A mechanistic approach to quantifying the energetics of animal dispersal

Authors

Caitlin Wilkinson ()

Ulrich Brose

Alexander Dyer

Myriam R. Hirt

Remo Ryser

Overview

This repository contains all underlying data and code needed to reproduce the analyses in the paper mentioned above.

Accessing code and data

See the code directory on GitHub for the code that generated the figures and analyses in the manuscript.

The raw data needed for analyses is provided in data.

Structure of the analysis

  • 0-disp-workflowr-script provides the code to create a workflowr project and organised subdirectories in GitHub (Blischak et al. 2023).

  • 1-fish-energy-reserve-and-trait-data provides the code to:

    1. extract body mass data from Fishbase and SeaLifeBase (Boettiger et al. 2023)
    1. Refitting the energy storage data provided in (Martin et al. 2017) to convert length (mm) to mass (g). This was to obtain the intercept and slope for the fish energy storage allometry used in our model
  • 2-disp-raw-data-transformation provides the code to transform the raw maximum dispersal distance data to:

    1. Import trait datasets and extract and harmonise names using rgbif
    1. Add in missing body mass data
    1. Add in missing movement mode
    1. Filtering data to include flying birds, running mammals, swimming fish only
    1. Harmonising all units for distance (m) and body mass (g)
  • 3-parameter-conversions provides the code to convert the units from the original parameter allometries to the ones used in the energy budget model.

  • 4-energy-function provides the energy-budget model function needed to obtain the energetic costs of dispersal in J.

  • 5-energy-data-visualisation provides the code needed to produce figures 3a-d in the paper mentioned above.

  • 6-disp-function provides the energy-budget model function needed to obtain the maximum dispersal distance of animals in m.

  • 7-disp-data-visualisation provides the code needed to:

    1. Make model predictions for maximum dispersal distance for each movement mode and related taxonomic group to compare to the empirical data
    1. Calculate the percentage of data which lies above model predictions
    1. Produce figures 2a-d and 4a-c in the paper mentioned above.

R-packages used

References

Blischak, J., Carbonetto, P., Stephens, M., GitLab), L.Z. (Instructions for hosting with, Server), P.F. (Support for hosting with S., code), T.T. (Instructions for sharing common, et al. (2023). workflowr: A Framework for Reproducible and Collaborative Data Science.

Boettiger, C., Chamberlain, S., Lang, D.T., Wainwright, P. & Cazelles, K. (2023). rfishbase: R Interface to “FishBase.” Chamberlain, S., Oldoni, D., Barve, V., Desmet, P., Geffert, L., Mcglinn, D., et al. (2024). rgbif: Interface to the Global Biodiversity Information Facility API.

Csárdi, G., Nepusz, T., Traag, V., Horvát, S., Zanini, F., Noom, D., et al. (2024). igraph: Network Analysis and Visualization. Garnier, S., Ross, N., Rudis, B., Sciaini, M., Camargo, A.P. & Scherer, C. (2024). viridis: Colorblind-Friendly Color Maps for R.

Martin, B.T., Heintz, R., Danner, E.M. & Nisbet, R.M. (2017). Integrating lipid storage into general representations of fish energetics. Journal of Animal Ecology, 86, 812–825.

Pedersen, T.L. & RStudio. (2024). ggraph: An Implementation of Grammar of Graphics for Graphs and Networks.

R Core Team. (2021). R: A Language and Environment for Statistical Computing.

Ushey, K., Allaire, J.J., Wickham, H., Ritchie, G. & RStudio. (2024). rstudioapi: Safely Access the RStudio API.

Wickham, H., Pedersen, T.L., Seidel, D., Posit & PBC. (2023). scales: Scale Functions for Visualization.