{"id":18006708,"url":"https://github.com/willgearty/biogradients","last_synced_at":"2025-04-04T11:41:52.566Z","repository":{"id":71540798,"uuid":"317962786","full_name":"willgearty/biogradients","owner":"willgearty","description":"Code and data for Boag, Gearty, and Stockey, Metabolic tradeoffs control biodiversity gradients through geological time, Current Biology 2021.","archived":false,"fork":false,"pushed_at":"2021-05-03T19:18:08.000Z","size":99799,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T21:31:24.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willgearty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-02T19:00:09.000Z","updated_at":"2021-05-03T19:16:20.000Z","dependencies_parsed_at":"2023-04-12T08:32:34.099Z","dependency_job_id":null,"html_url":"https://github.com/willgearty/biogradients","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.5,"last_synced_commit":"30eaad9735a4dbcf3b3937db84d61d448b955e7c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willgearty%2Fbiogradients","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willgearty%2Fbiogradients/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willgearty%2Fbiogradients/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willgearty%2Fbiogradients/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willgearty","download_url":"https://codeload.github.com/willgearty/biogradients/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174370,"owners_count":20896074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T01:09:31.483Z","updated_at":"2025-04-04T11:41:52.545Z","avatar_url":"https://github.com/willgearty.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/317962786.svg)](https://zenodo.org/badge/latestdoi/317962786)\n\nThis repository contains the required R code and data files to produce all of the analyses and plots in:  \n‘Metabolic tradeoffs control biodiversity gradients through geologic time’   \nThomas H. Boag, William Gearty, and Richard G. Stockey  \nCurrent Biology 2021  \nhttps://doi.org/10.1016/j.cub.2021.04.021\n\n  \nBefore running these R scripts, we suggest that you download this folder and set it as your R working directory. Required data files should then load when called in each script, and plot files will save within the same folder.  \n\n## Diversity-temperature analyses (main text figures 1-3, supplementary figures 1-3):  \nRun `diversity_temp.R` to produce all plots and analyses. Note that the analyses can take many hours to run.  \nYou can load `fossil_results.RData` into your environment to skip running all of the analyses.  \n\n## Metabolic model (main text figure 4, supplementary figure 4):  \nFigure 4 - run `Metabolic_model.10000.R`, then run `Metabolic_model_plot.10000.R`. Note that to fully reproduce Figure 4 'Temperature_data_extraction.R' will also need to be run (more details below), otherwise the ggplot2 object 'model' can be saved individually.  \nFigure S4 - run `Metabolic_model.10000.supp.R`, then run `Metabolic_model_plot.10000.supp.R`  \nNote that `Metabolic_model.10000.R` and `Metabolic_model.10000.supp.R` have long runtimes. To reduce these runtimes, the number of subsamples taken in the Monte Carlo can be reduced (e.g. 10,000 to 1000 or lower) to produce similar model results in shorter runtime. \n\n## Climate model equatorial temperature distributions (upper panel main text figure 4):  \nTo reproduce the equatorial temperature distributions plotted in the upper panel of Figure 4, run 'Temperature_data_extraction.R' after downloading the NetCDF files listed therein from the following webpages:  \nHistorical - http://data.ceda.ac.uk/badc/cmip5/data/cmip5/output1/MOHC/HadGEM2-ES/historical/mon/ocean/Omon/r1i1p1/files/thetao_20110916     \nRCP/ECP 4.5 - http://data.ceda.ac.uk/badc/cmip5/data/cmip5/output1/MOHC/HadGEM2-ES/rcp45/mon/ocean/Omon/r1i1p1/v20111206/thetao     \nRCP/ECP 8.5 - http://data.ceda.ac.uk/badc/cmip5/data/cmip5/output1/MOHC/HadGEM2-ES/rcp85/mon/ocean/Omon/r1i1p1/files/thetao_20111218      \n\n## To replicate the analyses and plots presented here, the following R packages are required:  \nAICcmodvg  \nbroom  \ndeeptime  \ndeSolve  \ndispeRse  \ndplyr  \ngeosphere   \nggplot2  \nHmisc  \nMASS  \nmgcv  \nncdf4  \npaleoMap  \nplyr  \nraster  \nrgbif  \nRNetCDF  \nrworldmap  \nsegmented  \nviridis  \n\nThe deeptime, paleoMap and dispeRse packages are currently only available on GitHub, and will need to be installed from there to reproduce\nthese analyses and plots. This can be achieved by running the following commands in your R console (ignore the first line \nif you already have devtools installed).  \n```r\ninstall.packages(\"devtools\")  \ndevtools::install_github(\"willgearty/deeptime\")  \ndevtools::install_github(\"willgearty/paleoMap\")  \ndevtools::install_github(\"laurasoul/dispeRse\")  \n```\n  \n  \nAll other packages can be installed from CRAN. These scripts have been tested using R version 4.0.3 - \nCopyright (C) 2020 The R Foundation for Statistical Computing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillgearty%2Fbiogradients","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillgearty%2Fbiogradients","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillgearty%2Fbiogradients/lists"}