{"id":15555248,"url":"https://github.com/brews/bayfoxr","last_synced_at":"2025-04-23T20:45:23.754Z","repository":{"id":56936990,"uuid":"139189357","full_name":"brews/bayfoxr","owner":"brews","description":"A Bayesian, global planktic foraminifera core top calibration to sea-surface temperatures, for R.","archived":false,"fork":false,"pushed_at":"2022-06-23T00:27:43.000Z","size":15370,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T01:27:36.190Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-29T19:46:31.000Z","updated_at":"2023-12-10T16:54:44.000Z","dependencies_parsed_at":"2022-08-21T05:50:50.372Z","dependency_job_id":null,"html_url":"https://github.com/brews/bayfoxr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Fbayfoxr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Fbayfoxr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Fbayfoxr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Fbayfoxr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brews","download_url":"https://codeload.github.com/brews/bayfoxr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513380,"owners_count":21443200,"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-02T15:07:31.953Z","updated_at":"2025-04-23T20:45:23.730Z","avatar_url":"https://github.com/brews.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bayfoxr\n\n[![Travis-CI Build Status](https://travis-ci.org/brews/bayfoxr.svg?branch=master)](https://travis-ci.org/brews/bayfoxr)\n[![Coverage Status](https://coveralls.io/repos/github/brews/bayfoxr/badge.svg?branch=master)](https://coveralls.io/github/brews/bayfoxr?branch=master)\n\nA Bayesian, global planktic foraminifera core top calibration to sea-surface temperature (SST), for R.\n\n*NOTE* This repository and package is no longer actively maintained.\n\n## What is bayfoxr?\n\nbayfoxr is a suite of linear Bayesian calibration models for planktic core top foraminiferal δ18O (δ18Oc) and SSTs. These calibrations are especially useful because they capture the uncertainty in the relationship between modern SSTs and core top δ18Oc. This package is a companion to a paper currently under preparation for the journal \"Paleoceanography and Paleoclimatology\".\n\n## A quick example\n\n```R\nlibrary(bayfoxr)\n\ndata(bassriver)\n```\n\nThe `bassriver` is example data that comes with the package. It is marine core samples from [John et al. (2008)](https://doi.org/10.1029/2007PA001465). The data.frame has two columns: \"depth\", giving down-core depth in meters, and \"d18o\", foraminifera (*Morozovella spp.*) calcite d18O samples (‰ VPDB). The core samples cover the [Paleocene-Eocene thermal maximum (PETM)](https://en.wikipedia.org/wiki/Paleocene%E2%80%93Eocene_Thermal_Maximum).\n\nLet's run this data through our annual pooled calibration model to make inferences about past SST. *Morozovella spp.* is a nonexant species so, we're using modern planktic foraminifera as an analog with this pooled calibration.\n\n```R\nsst \u003c- predict_seatemp(bassriver$d18o, d18osw = 0.0, \n                       prior_mean = 30.0, prior_std = 20.0)\n```\n\nThe predict function then spits out a `prediction` object. Note that we need to specify d18O for seawater (`d18osw`), and a prior mean and standard deviation for our SST inference. See `help(predict_seatemp)` for more details, or `help(predict_d18oc)` for the reversed, \"forward\" model. \n\nThe `sst` variable contains an ensemble rather than single prediction points because the calibration is a Bayesian regression model. This ensemble is in `sst[['ensemble']]`. Here we get median and 90% interval for the prediction:\n\n```R\nquantile(sst, probs = c(0.05, 0.50, 0.95))\n```\n\nWe can also make a quick and dirty plot to visualize the inference:\n\n```R\npredictplot(x = bassriver$depth, y = sst, ylim = c(20, 40), \n            ylab = \"SST (°C)\", xlab = \"Depth (m)\")\n```\n\n## Citing bayfoxr in your research\n\nPlease cite our work if you use bayfoxr in your research. We have a paper currently in preparation and I'll be sure to update this section with the citation as soon as the paper is out.\n\nTo cite the code repository directly use:\n\n*Malevich, Steven B., 2019. bayfoxr. \\\u003chttps://github.com/brews/bayfoxr \\\u003e.*\n\nAlternatively, you can cite the package in R's CRAN repository. You can see this information by running `citation(\"bayfoxr\")` in an R session.\n\n## Installation\n\n### From CRAN\n\n`bayfoxr` is hosted on the offical [CRAN repository](https://cran.r-project.org/package=bayfoxr). Install it from an R session with:\n\n```R\ninstall.packages(\"bayfoxr\")\n```\n\n### From devtools\n\nBleeding edge and development versions of the package can be installed with [`devtools`](https://github.com/r-lib/devtools). Assuming you have `devtools` installed in R, you can install `bayfoxr` with:\n\n```R\ndevtools::install_github(\"brews/bayfoxr\")\n```\n\n## Support\n\nDocumentation is included in the code and can be viewed in R. Please file issues and requests in the [bug tracker](https://github.com/brews/bayfoxr/issues).\n\n## Development\nWant to contribute? We're following [Hadley's packaging workflow](http://r-pkgs.had.co.nz/) and [code style](http://adv-r.had.co.nz/Style.html). Please fork away and get in touch if you have a feature or bug fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrews%2Fbayfoxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrews%2Fbayfoxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrews%2Fbayfoxr/lists"}