BlueCarbon
Estimation of organic carbon stocks and sequestration rates from soil/sediment cores from blue carbon ecosystems
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 9 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.8%) to scientific vocabulary
Keywords
blue-carbon
bluecarbon
carbon
ecology
r-package
Keywords from Contributors
interpretability
standardization
animal
hack
Last synced: 6 months ago
·
JSON representation
·
Repository
Estimation of organic carbon stocks and sequestration rates from soil/sediment cores from blue carbon ecosystems
Basic Info
- Host: GitHub
- Owner: EcologyR
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://ecologyr.github.io/BlueCarbon/
- Size: 3.83 MB
Statistics
- Stars: 9
- Watchers: 6
- Forks: 2
- Open Issues: 3
- Releases: 1
Topics
blue-carbon
bluecarbon
carbon
ecology
r-package
Created almost 3 years ago
· Last pushed 8 months ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Citation
README.Rmd
---
output: github_document
editor_options:
markdown:
wrap: sentence
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# BlueCarbon
`r badger::badge_cran_release()`  [](https://github.com/EcologyR/BlueCarbon/actions/workflows/R-CMD-check.yaml) [](https://app.codecov.io/gh/EcologyR/BlueCarbon) `r badger::badge_lifecycle("stable")` `r badger::badge_repostatus("Active")` [](https://cran.r-project.org/package=BlueCarbon)
The goal of BlueCarbon is to facilitate the estimation of organic carbon stocks and sequestration rates from soil/sediment cores from blue carbon ecosystems.
Following the protocols published by the Blue Carbon initiative [Howard et al. (2014)](https://www.cifor-icraf.org/knowledge/publication/5095/).
It includes seven main [functions](https://ecologyr.github.io/BlueCarbon/reference/index.html) to (1) estimate core compaction, (2) correct core compaction, (3) estimate sample thickness, (4) estimate organic carbon content from organic matter content, (5) estimate organic carbon stocks and (6) sequestration rates, and (7) visualize the error in stock extrapolation.
{width="527"}
#### ***estimate_compaction*** **- Estimate Core Compaction**
Sampling soil cores by manual percussion often results in the compaction of the material retrieved.
This function (`estimate_compaction()`) estimates the percentage of compaction using measurements taken before and after inserting the corer tube (Fig. 2): the length of the corer tube (sampler_length), distance between the surface of the soil and the top of the tube in the outside (external_distance) and distance between the surface of the soil and the top of the tube in the inside of the tube (internal_distance).
{width="364"}
#### ***decompact*** **- Calculate sediment properties after decompaction**
Core compaction derived from field extraction can be mathematically corrected to estimate the original depth of the samples.
This function (`decompact()`) applies a linear correction (assuming uniform compaction of the core material) to adjust the sample depth accurately.
If dry bulk density data is provided, the function also corrects it accordingly.
#### ***estimate_oc*** **- Organic carbon % estimation from organic matter %**
There is a linear correlation between organic carbon and organic matter content.
This correlation can vary across ecosystems and sampling sites.
This function (`estimate_oc()`) fits a linear regression model between organic matter and organic carbon content of the samples and predicts organic carbon values for samples where the latter information is missing.
Estimation of organic carbon is performed using a linear regression between the logarithm of the organic carbon content and the logarithm of the organic matter content (log(organic carbon) \\\~ log(organic matter)), providing an organic carbon value for each organic matter value.
It fits a model for each sampling station, dominant species, and ecosystem.
If an organic carbon value is already available for a sample, the function returns it.
Otherwise, it applies the model for the corresponding sampling station.
If a model cannot be fitted for that station (e.g. because of limited sample size) or if the model fit is poor, the function instead applies the model for the dominant species.
If no suitable species-level model exists, it then applies the ecosystem-level model.
If no models are available at any of these levels, the function defaults to published models: [Fourqurean et al. (2012)](https://doi.org/10.1038/ngeo1477) for seagrasses, [Maxwell et al. (2023)](https://doi.org/10.1038/s41597-023-02633-x) for salt marshes, and [Piñeiro-Juncal et al. (2025)](https://doi.org/10.1038/s43247-025-02390-2) for mangroves.
It is unlikely, but possible, that the model predicts higher organic carbon than organic matter content.
If this occurs, the function issues a warning, and it is recommended to discard that model.
#### ***estimate_h*** **- Sample thickness estimation**
For cores where only selected samples were measured, it is necessary to assign a carbon density to the unmeasured sections before estimating the total stock.
This function (`estimate_h()`) identifies gaps between samples and, if any are present, divides the space between the previous and next sample, ensuring continuous samples without gaps in the core (Fig. 3).
The midpoint between two consecutive samples is estimated from the bottom of the previous sample to the top of the next sample, preventing the uneven distribution of gaps between samples with different thickness.
The stock and sequestration rate estimation functions (`estimate_oc_stock()` and `estimate_seq_rate()`) already incorporate this function, so there is no need to run it separately.
{width="365"}
#### ***estimate_oc_stock*** **- Organic carbon stock estimation**
Estimates carbon stocks from soil core data down to a specified depth, with 100 as the default.
If the core does not reach the desired depth, the function extrapolates the stock using a linear model based on the relationship between accumulated organic carbon mass and depth.
In this model, accumulated organic carbon mass (stock) is the target variable and depth the explanatory variable (lm(accumulated organic carbon mass \~ depth)).
Therefore, this function will always provide either a estimated stock (if the core reaches the desired depth) or a predicted stock (if not).
However, if the max depth of the core and the desired depth differ greatly, this predicted depth could differ greatly from the real stock.
We recommend that, if possible, the users use the function `test_extrapolation()` to assess the error of this extrapolation, and that they clearly indicate the maximum depth of the cores in the methods section of the resulting research outputs.
{width="380"}
#### ***test_extrapolation*** **- Visualize the error of stock extrapolation**
This function subset the cores that reach the desired depth, estimates the observed stock, and estimates the stock using the linear model on the relationship between accumulated organic carbon mass and depth.
Extrapolations are performed using the top 90, 75, 50 and 25% length of the specified depth.
The function then compares the observed stock with the extrapolated stock estimates.
Note that this function requires that at least some cores reach the desired depth.
#### ***estimate_seq_rate*** **- Organic carbon sequestration rates estimation**
Estimates the average organic carbon sequestration rate in the soil over a specified time frame (by default 100).
The average sequestration rate is calculated by dividing the stock at the depth corresponding to the target time frame by the length of the time frame itself.
## Installation
BlueCarbon can be installed directly from [CRAN](https://cran.r-project.org/package=BlueCarbon):
``` r
install.packages("BlueCarbon")
```
or from [R-universe](https://ecologyr.r-universe.dev/BlueCarbon):
``` r
install.packages("BlueCarbon", repos = c("https://ecologyr.r-universe.dev", "https://cloud.r-project.org"))
```
Or from [GitHub](https://github.com/EcologyR/BlueCarbon):
``` r
# install.packages("remotes")
remotes::install_github("EcologyR/BlueCarbon")
```
## Citation
If using this package, please cite it:
```{r comment=NA}
citation("BlueCarbon")
```
## Code of Conduct
Please note that the BlueCarbon project is released with a [Contributor Code of Conduct](https://ecologyr.github.io/BlueCarbon/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
## Funding
The development of this software has been funded by Fondo Europeo de Desarrollo Regional (FEDER) and Consejería de Transformación Económica, Industria, Conocimiento y Universidades of Junta de Andalucía (project US-1381388 led by Francisco Rodríguez Sánchez, Universidad de Sevilla).
NPJ was supported by a Juan de la Cierva fellowship (JDC2022-048342-I, MCIN/AEI/10.13039/501100011033, European Union “NextGenerationEU”/PRTR”).
JA acknowledges funding from the CLIMB-FOREST Horizon Europe Project (No 101059888) funded by the European Union.
FRS was supported by VI PPIT-US from Universidad de Sevilla.
MM was supported by a FCT PhD grant ().

Owner
- Name: EcologyR
- Login: EcologyR
- Kind: organization
- Repositories: 2
- Profile: https://github.com/EcologyR
JOSS Publication
BlueCarbon R package: Estimation of Organic Carbon Stocks and Sequestration Rates From Soil Core Data
Published
November 25, 2025
Volume 10, Issue 115, Page 8333
Authors
Nerea Piñeiro-Juncal
Centro de Investigacions Mariñas da Universidade de Vigo. Departamento de Xeocencias Mariñas e Ordenación do Territorio, Facultade de Ciencias do Mar, Campus Lagoas Marcosende, Universidad de Vigo, Vigo, Spain
Centro de Investigacions Mariñas da Universidade de Vigo. Departamento de Xeocencias Mariñas e Ordenación do Territorio, Facultade de Ciencias do Mar, Campus Lagoas Marcosende, Universidad de Vigo, Vigo, Spain
Julen Astigarraga
Universidad de Alcalá, Grupo de Ecología Forestal y Restauración (FORECO), Departamento de Ciencias de la Vida, Spain, Department of Physical Geography and Ecosystem Science, Lund University, Lund, Sweden
Universidad de Alcalá, Grupo de Ecología Forestal y Restauración (FORECO), Departamento de Ciencias de la Vida, Spain, Department of Physical Geography and Ecosystem Science, Lund University, Lund, Sweden
Valentina Costa
Stazione Zoologica Anton Dohrn – CRIMAC, Calabria Marine Centre, Department of Integrative Marine Ecology, Amendolara (CS), Italy, National Institute of Oceanography and Applied Geophysics – OGS, Italy, NBFC, National Biodiversity Future Center, Palermo, Italy
Stazione Zoologica Anton Dohrn – CRIMAC, Calabria Marine Centre, Department of Integrative Marine Ecology, Amendolara (CS), Italy, National Institute of Oceanography and Applied Geophysics – OGS, Italy, NBFC, National Biodiversity Future Center, Palermo, Italy
Tags
ecology climate change blue carbon ecosystems carbon sequestrationCitation (CITATION.cff)
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
cff-version: 1.2.0
message: 'To cite package "BlueCarbon" in publications use:'
type: software
license: GPL-3.0-or-later
title: 'BlueCarbon: Estimation of Organic Carbon Stocks and Sequestration Rates from
Soil Core Data'
version: 0.1.0
abstract: Tools to estimate soil organic carbon stocks and sequestration rates in
blue carbon ecosystems. 'BlueCarbon' contains functions to estimate and correct
for core compaction, estimate sample thickness, estimate organic carbon content
from organic matter content, estimate organic carbon stocks and sequestration rates,
and visualize the error of carbon stock extrapolation.
authors:
- family-names: Piñeiro-Juncal
given-names: Nerea
email: nerea.pineiro.juncal@uvigo.gal
orcid: https://orcid.org/0000-0003-3767-1812
- family-names: Astigarraga
given-names: Julen
orcid: https://orcid.org/0000-0001-9520-3713
- family-names: Costa
given-names: Valentina
orcid: https://orcid.org/0000-0002-1513-0284
- family-names: Martins
given-names: Marcio
orcid: https://orcid.org/0000-0002-6969-2215
- family-names: Rodriguez-Sanchez
given-names: Francisco
orcid: https://orcid.org/0000-0002-7981-1599
preferred-citation:
type: manual
title: 'BlueCarbon: Estimation of Organic Carbon Stocks and Sequestration Rates
From Soil Core Data'
authors:
- family-names: Piñeiro-Juncal
given-names: Nerea
email: nerea.pineiro.juncal@uvigo.gal
orcid: https://orcid.org/0000-0003-3767-1812
- family-names: Astigarraga
given-names: Julen
orcid: https://orcid.org/0000-0001-9520-3713
- family-names: Costa
given-names: Valentina
orcid: https://orcid.org/0000-0002-1513-0284
- family-names: Martins
given-names: Marcio
orcid: https://orcid.org/0000-0002-6969-2215
- family-names: Rodriguez-Sanchez
given-names: Francisco
orcid: https://orcid.org/0000-0002-7981-1599
year: '2025'
url: https://github.com/EcologyR/BlueCarbon
notes: R package version 0.1.0, https://EcologyR.github.io/BlueCarbon/
repository-code: https://github.com/EcologyR/BlueCarbon
url: https://ecologyr.github.io/BlueCarbon/
contact:
- family-names: Piñeiro-Juncal
given-names: Nerea
email: nerea.pineiro.juncal@uvigo.gal
orcid: https://orcid.org/0000-0003-3767-1812
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
url: https://www.R-project.org/
authors:
- name: R Core Team
institution:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2025'
version: '>= 4.1'
- type: software
title: covr
abstract: 'covr: Test Coverage for Packages'
notes: Suggests
url: https://covr.r-lib.org
repository: https://CRAN.R-project.org/package=covr
authors:
- family-names: Hester
given-names: Jim
email: james.f.hester@gmail.com
year: '2025'
doi: 10.32614/CRAN.package.covr
- type: software
title: testthat
abstract: 'testthat: Unit Testing for R'
notes: Suggests
url: https://testthat.r-lib.org
repository: https://CRAN.R-project.org/package=testthat
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
year: '2025'
doi: 10.32614/CRAN.package.testthat
version: '>= 3.0.0'
- type: software
title: dplyr
abstract: 'dplyr: A Grammar of Data Manipulation'
notes: Imports
url: https://dplyr.tidyverse.org
repository: https://CRAN.R-project.org/package=dplyr
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
- family-names: François
given-names: Romain
orcid: https://orcid.org/0000-0002-2444-4226
- family-names: Henry
given-names: Lionel
- family-names: Müller
given-names: Kirill
orcid: https://orcid.org/0000-0002-1416-3412
- family-names: Vaughan
given-names: Davis
email: davis@posit.co
orcid: https://orcid.org/0000-0003-4777-038X
year: '2025'
doi: 10.32614/CRAN.package.dplyr
- type: software
title: ggplot2
abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics'
notes: Imports
url: https://ggplot2.tidyverse.org
repository: https://CRAN.R-project.org/package=ggplot2
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
- family-names: Chang
given-names: Winston
orcid: https://orcid.org/0000-0002-1576-2126
- family-names: Henry
given-names: Lionel
- family-names: Pedersen
given-names: Thomas Lin
email: thomas.pedersen@posit.co
orcid: https://orcid.org/0000-0002-5147-4711
- family-names: Takahashi
given-names: Kohske
- family-names: Wilke
given-names: Claus
orcid: https://orcid.org/0000-0002-7470-9261
- family-names: Woo
given-names: Kara
orcid: https://orcid.org/0000-0002-5125-4188
- family-names: Yutani
given-names: Hiroaki
orcid: https://orcid.org/0000-0002-3385-7233
- family-names: Dunnington
given-names: Dewey
orcid: https://orcid.org/0000-0002-9415-4582
- family-names: Brand
given-names: Teun
name-particle: van den
orcid: https://orcid.org/0000-0002-9335-7468
year: '2025'
doi: 10.32614/CRAN.package.ggplot2
- type: software
title: gridExtra
abstract: 'gridExtra: Miscellaneous Functions for "Grid" Graphics'
notes: Imports
repository: https://CRAN.R-project.org/package=gridExtra
authors:
- family-names: Auguie
given-names: Baptiste
email: baptiste.auguie@gmail.com
year: '2025'
doi: 10.32614/CRAN.package.gridExtra
- type: software
title: reshape
abstract: 'reshape: Flexibly Reshape Data'
notes: Imports
url: http://had.co.nz/reshape
repository: https://CRAN.R-project.org/package=reshape
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@rstudio.com
year: '2025'
doi: 10.32614/CRAN.package.reshape
GitHub Events
Total
- Create event: 2
- Release event: 1
- Issues event: 25
- Watch event: 6
- Delete event: 1
- Issue comment event: 14
- Push event: 56
- Fork event: 2
Last Year
- Create event: 2
- Release event: 1
- Issues event: 25
- Watch event: 6
- Delete event: 1
- Issue comment event: 14
- Push event: 56
- Fork event: 2
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| NPJuncal | n****l@g****m | 145 |
| Francisco Rodriguez-Sanchez | f****c@g****m | 82 |
| NPJuncal | n****l@g****m | 31 |
| Julen Astigarraga | j****a@g****m | 14 |
| github-actions[bot] | 4****] | 4 |
| Saras Windecker | s****r | 4 |
| MarcioFCMartins | m****d@g****m | 4 |
| costavale | v****a@h****m | 3 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 51
- Total pull requests: 7
- Average time to close issues: 5 months
- Average time to close pull requests: 3 days
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 2.29
- Average comments per pull request: 0.71
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 12
- Pull requests: 1
- Average time to close issues: about 1 month
- Average time to close pull requests: about 3 hours
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.92
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- NPJuncal (32)
- smwindecker (9)
- Pakillo (7)
- Julenasti (1)
Pull Request Authors
- Julenasti (3)
- Pakillo (1)
- smwindecker (1)
- NPJuncal (1)
Top Labels
Issue Labels
enhancement (13)
bug (8)
question (3)
invalid (2)
good first issue (1)
documentation (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 131 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: BlueCarbon
Estimation of Organic Carbon Stocks and Sequestration Rates from Soil Core Data
- Homepage: https://github.com/EcologyR/BlueCarbon
- Documentation: http://cran.r-project.org/web/packages/BlueCarbon/BlueCarbon.pdf
- License: GPL (≥ 3)
-
Latest release: 0.1.0
published about 1 year ago
Rankings
Dependent packages count: 27.2%
Dependent repos count: 33.4%
Average: 49.2%
Downloads: 87.0%
Maintainers (1)
Last synced:
6 months ago