| Title: | Remote Sensing-Derived Yield Curves for Canada |
|---|---|
| Description: | Provides published remote sensing-based yield curves for aboveground biomass and total volume across Canada, as described in Tompalski et al. (2024) <doi:10.1016/j.foreco.2024.121894> and Tompalski et al. (2025) <doi:10.1093/forestry/cpaf067>. Models are available for 150 km tiles and four levels of Canada's ecological land classification. Functions help users find curves by species and area, estimate yield at a given stand age, calibrate curves to local observations, and build spatial yield-curve datasets. |
| Authors: | Piotr Tompalski [aut, cre, cph], His Majesty the King in Right of Canada, as represented by the Minister of Natural Resources Canada [cph] |
| Maintainer: | Piotr Tompalski <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.2.0 |
| Built: | 2026-11-03 23:45:40 UTC |
| Source: | https://github.com/cran/RSYC |
List the published Canada-wide curves that match a forest measure, species,
type of area, or area name. Leave a choice as NULL to include all of its
available values.
available_rsyc_models( response = NULL, species = NULL, strata_level = NULL, strata_id = NULL )available_rsyc_models( response = NULL, species = NULL, strata_level = NULL, strata_id = NULL )
response |
One or both forest measures: |
species |
One or more species codes or broad groups. Uppercase and lowercase letters are treated the same. The default includes all species. Unknown species codes produce a warning. |
strata_level |
One or more types of area: |
strata_id |
One or more tile IDs, ecological area names or paths, or
ecological codes. Tile IDs, names, and paths are matched ignoring case.
Numeric values and numeric-looking character values are
interpreted as codes when no name or path matches. Code searches require
exactly one ecological |
Character strata_id values are matched as names or paths before
numeric-looking values are interpreted as ecological codes. Ecozone codes
5 and 6 return both published named subdivisions. Ecozone code 10 is also
ambiguous, but currently has no published national model rows.
A table with one row for each published curve that matches the
choices. strata_code is the canonical character code for ecological
rows and NA for tiles.
available_rsyc_models( response = "volume", species = "PICE.MAR", strata_level = "tile" ) available_rsyc_models( response = "agb", strata_level = "ecoprovince", strata_id = "7.1" )available_rsyc_models( response = "volume", species = "PICE.MAR", strata_level = "tile" ) available_rsyc_models( response = "agb", strata_level = "ecoprovince", strata_id = "7.1" )
Estimate yield for one or more species across a set of tiles or ecological areas. The boundary map is kept separate from the curve table so that each area shape is stored only once.
build_rsyc_dataset( response, species, age = 1:150, strata_level = "tile", strata_id = NULL, output = NULL, overwrite = FALSE, cache_dir = tools::R_user_dir("RSYC", "data"), quiet = TRUE )build_rsyc_dataset( response, species, age = 1:150, strata_level = "tile", strata_id = NULL, output = NULL, overwrite = FALSE, cache_dir = tools::R_user_dir("RSYC", "data"), quiet = TRUE )
response |
Forest measure to estimate: |
species |
One or more species codes or broad groups. Uppercase and lowercase letters are treated the same. Requested species without a published curve for the selected response and areas are omitted with a warning. |
age |
One or more stand ages in years. |
strata_level |
Type of area: |
strata_id |
One or more tile IDs, ecological area names or paths, or
ecological codes. Tile IDs, names, and paths are matched ignoring case.
Numeric values and numeric-looking character values are
interpreted as codes when no name or path matches. Quote ecoprovince codes
such as |
output |
Location of an optional GeoPackage file. When supplied, the
file contains a boundary map named |
overwrite |
Replace an existing GeoPackage at |
cache_dir |
Folder in which to save the GeoPackage. By default, RSYC
uses its standard user data folder, returned by |
quiet |
Hide download progress? |
The function currently uses only curves fitted across Canada. It does not
substitute a curve from another type of area or from a regional fit.
Ecological boundaries must first be downloaded with
download_rsyc_boundaries(); tile boundaries are included with RSYC.
Ecozone codes 5, 6, and 10 are ambiguous and must instead be supplied as a
subdivision name or path.
Three named results: spatial, an sf boundary map; curves, a
table of yield estimates containing canonical character strata_code
values (NA for tiles); and metadata, a one-row summary of the data and
choices used. Ecological spatial results contain strata_code plus the
hierarchy names and source ID fields through the requested level. Tile
spatial results contain strata_id and geometry.
tile_dataset <- build_rsyc_dataset( response = "agb", species = c("PICE.MAR", "POPU.TRE"), age = c(50, 100, 150), strata_level = "tile", strata_id = c("H14", "F31") ) tile_dataset$spatial tile_dataset$curvestile_dataset <- build_rsyc_dataset( response = "agb", species = c("PICE.MAR", "POPU.TRE"), age = c(50, 100, 150), strata_level = "tile", strata_id = c("H14", "F31") ) tile_dataset$spatial tile_dataset$curves
Adjust a published RSYC curve to local field data using a best linear unbiased predictor (BLUP) of the local level. Given one or more observed values (aboveground biomass or total volume) at known stand ages, the function estimates a shrinkage-based local level adjustment and applies it as a multiplicative ratio to the selected national curve.
calibrate_rsyc( response, species, strata_level, strata_id, obs_age, obs_response, predict_age = NULL, apply_limits = TRUE, random_effect_limit_sd = 3, ratio_limit = 5, value_limit = 1000 )calibrate_rsyc( response, species, strata_level, strata_id, obs_age, obs_response, predict_age = NULL, apply_limits = TRUE, random_effect_limit_sd = 3, ratio_limit = 5, value_limit = 1000 )
response |
Forest measure to estimate: |
species |
A species code or broad group such as |
strata_level |
Type of area: |
strata_id |
Tile ID, ecological area name or path, or ecological code.
Tile IDs, names, and paths are matched ignoring case.
A single area name can be used when it occurs only once. If the name occurs
in several places, use the full sequence of area names shown by
|
obs_age |
Stand ages, in years, of the local observations. |
obs_response |
Observed non-negative values at |
predict_age |
One or more stand ages at which to return calibrated
predictions. Defaults to the sorted unique |
apply_limits |
When |
random_effect_limit_sd |
Number of standard deviations of the local
random-effect distribution at which the estimate is constrained. The
default of |
ratio_limit |
Largest allowed calibration ratio before the adjustment
is discarded. Only used when |
value_limit |
Largest allowed calibrated value before the prediction
falls back to the bare curve. Only used when |
The RSYC models are nonlinear mixed-effects models in which the tile- and
pixel-level random effects act on , the parameter associated
with the maximum biomass (or volume) potential (the asymptote parameter):
where indexes the tile, the pixel nested within the tile,
the age, and
is the
age-related modifier. The random effects and residual errors are assumed to
be independent and normally distributed with mean zero. Hats denote
estimated values. The b1 coefficient published in RSYC_models is the
tile-level asymptote parameter, already equal to
, so the yield curve based on the tile-level
conditional prediction is .
Local calibration estimates the pixel-level random effect of
the calibration plot (assumed to coincide with pixel within tile
) conditional on the fitted model. Given observations
at ages , with ,
where is the estimated pixel-level (nested within
tile) random-effect variance and is the
estimated residual variance. The
term shrinks weak local
evidence toward no adjustment. The calibrated curve substitutes the adjusted
asymptote parameter into the same equation,
which is equivalent to scaling the published curve by
, reported as ratio_blup.
With a single observation this becomes a one-point level anchor. The result should be read as a single-observation BLUP-anchored RSYC curve, not as a local growth trajectory learned from the data.
A list with the components:
A table of age and the calibrated value at each
predict_age, together with the bare-curve value_uncalibrated.
The multiplicative local adjustment applied to the curve.
The estimated pixel-level random effect
(capped and shrunk when apply_limits is TRUE).
The shrinkage weight in [0, 1]; values near 0
mean weak local evidence pulled toward no adjustment.
Number of observations used.
Flags indicating whether each safeguard altered the result.
Identifier of the national curve that was calibrated.
Tompalski, P., Hermosilla, T., Baral, S.K., Wulder, M.A., and White, J.C. (2025). National remote sensing-derived aboveground biomass yield curves for Canada. Forestry: An International Journal of Forest Research. doi:10.1093/forestry/cpaf067
# One observation for a tile model selected by tile ID. calibrate_rsyc( "agb", "PICE.MAR", "tile", "H14", obs_age = 45, obs_response = 65 ) # Two observations for an ecoregion selected by numeric code. calibrate_rsyc( "agb", "PICE.MAR", "ecoregion", 198, obs_age = c(45, 70), obs_response = c(52, 65) ) # Four observations for an ecodistrict selected by full hierarchy path. calibrate_rsyc( "agb", "PICE.MAR", "ecodistrict", paste( "Atlantic Maritime", "Fundy Uplands", "Annapolis-Minas Lowlands", "Windsor Lowlands", sep = "/" ), obs_age = c(30, 50, 70, 90), obs_response = c(22, 31, 36, 39) )# One observation for a tile model selected by tile ID. calibrate_rsyc( "agb", "PICE.MAR", "tile", "H14", obs_age = 45, obs_response = 65 ) # Two observations for an ecoregion selected by numeric code. calibrate_rsyc( "agb", "PICE.MAR", "ecoregion", 198, obs_age = c(45, 70), obs_response = c(52, 65) ) # Four observations for an ecodistrict selected by full hierarchy path. calibrate_rsyc( "agb", "PICE.MAR", "ecodistrict", paste( "Atlantic Maritime", "Fundy Uplands", "Annapolis-Minas Lowlands", "Windsor Lowlands", sep = "/" ), obs_age = c(30, 50, 70, 90), obs_response = c(22, 31, 36, 39) )
Download and save the ecological boundary maps used by RSYC. The file is not downloaded when the package is installed or loaded. It contains maps of ecozones, ecoprovinces, ecoregions, and ecodistricts, but no yield curves. Tile boundaries are already included with RSYC.
download_rsyc_boundaries( cache_dir = tools::R_user_dir("RSYC", "data"), overwrite = FALSE, quiet = FALSE, url = getOption("RSYC.ecostrat_url", .rsyc_ecostrat_url) )download_rsyc_boundaries( cache_dir = tools::R_user_dir("RSYC", "data"), overwrite = FALSE, quiet = FALSE, url = getOption("RSYC.ecostrat_url", .rsyc_ecostrat_url) )
cache_dir |
Folder in which to save the GeoPackage. By default, RSYC
uses its standard user data folder, returned by |
overwrite |
Replace a previously downloaded file? |
quiet |
Hide download progress? |
url |
Web address of the boundary file. The default points to the copy published with RSYC. Organizations may instead provide the address of an approved copy. Its contents must match the published file. |
The full location of the saved GeoPackage. The function returns this location without printing it.
# Save to a temporary folder here; omit `cache_dir` to use the default. path <- try(download_rsyc_boundaries(cache_dir = tempdir()))# Save to a temporary folder here; omit `cache_dir` to use the default. path <- try(download_rsyc_boundaries(cache_dir = tempdir()))
Estimate aboveground biomass or total volume at one or more stand ages. The curve is selected by species and area.
predict_rsyc(response, species, age, strata_level, strata_id)predict_rsyc(response, species, age, strata_level, strata_id)
response |
Forest measure to estimate: |
species |
A species code or broad group such as |
age |
One or more stand ages in years. |
strata_level |
Type of area: |
strata_id |
Tile ID, ecological area name or path, or ecological code.
Tile IDs, names, and paths are matched ignoring case.
A single area name can be used when it occurs only once. If the name occurs
in several places, use the full sequence of area names shown by
|
This function currently uses curves fitted across Canada. The curves were
fitted for stand ages 1 through 150 years. The function warns when asked to
estimate outside this age range; age 0 is also allowed as the start of a
curve. When a full ecological area sequence is needed, use / between the
ecozone, ecoprovince, ecoregion, and ecodistrict names.
Ecological codes are resolved only within the selected strata_level.
Ecozone codes 5, 6, and 10 each identify two named package subdivisions and
therefore cannot select a single curve; use the desired subdivision name.
One estimated value for each stand age. AGB is in Mg/ha and volume is in m3/ha.
# Select a tile model with its tile ID. predict_rsyc("agb", "PICE.MAR", c(20, 60, 120), "tile", "H14") # Select an ecozone model with its unique name. predict_rsyc( response = "volume", species = "PICE.MAR", age = c(20, 60, 120), strata_level = "ecozone", strata_id = "Boreal Shield East" ) # Select an ecoregion model with its numeric ecological code. predict_rsyc( "agb", "PICE.MAR", c(40, 80), "ecoregion", 198 ) # A full hierarchy path is an unambiguous ecological selector. predict_rsyc( "agb", "PICE.MAR", 80, "ecodistrict", paste( "Atlantic Maritime", "Fundy Uplands", "Annapolis-Minas Lowlands", "Windsor Lowlands", sep = "/" ) )# Select a tile model with its tile ID. predict_rsyc("agb", "PICE.MAR", c(20, 60, 120), "tile", "H14") # Select an ecozone model with its unique name. predict_rsyc( response = "volume", species = "PICE.MAR", age = c(20, 60, 120), strata_level = "ecozone", strata_id = "Boreal Shield East" ) # Select an ecoregion model with its numeric ecological code. predict_rsyc( "agb", "PICE.MAR", c(40, 80), "ecoregion", 198 ) # A full hierarchy path is an unambiguous ecological selector. predict_rsyc( "agb", "PICE.MAR", 80, "ecodistrict", paste( "Atlantic Maritime", "Fundy Uplands", "Annapolis-Minas Lowlands", "Windsor Lowlands", sep = "/" ) )
Read the tile boundaries or ecological boundaries used for the RSYC yield
curves. Tile boundaries are included with the package. Ecological boundaries
are read from the file saved by download_rsyc_boundaries(). This function
never downloads data on its own.
rsyc_boundaries( strata_level = "tile", cache_dir = tools::R_user_dir("RSYC", "data"), quiet = TRUE )rsyc_boundaries( strata_level = "tile", cache_dir = tools::R_user_dir("RSYC", "data"), quiet = TRUE )
strata_level |
Type of area: |
cache_dir |
Folder in which to save the GeoPackage. By default, RSYC
uses its standard user data folder, returned by |
quiet |
Hide messages produced while the map is read? |
An sf map in the Canada Atlas Lambert projection (EPSG:3978). Tile
maps contain strata_id and geometry. Ecological maps additionally contain
canonical character strata_code and the hierarchy names and source ID
fields through the requested level.
if (requireNamespace("sf", quietly = TRUE)) { tiles <- rsyc_boundaries("tile") } if (requireNamespace("sf", quietly = TRUE)) { cache <- tempdir() if (!inherits(try(download_rsyc_boundaries(cache_dir = cache)), "try-error")) { districts <- rsyc_boundaries("ecodistrict", cache_dir = cache) } }if (requireNamespace("sf", quietly = TRUE)) { tiles <- rsyc_boundaries("tile") } if (requireNamespace("sf", quietly = TRUE)) { cache <- tempdir() if (!inherits(try(download_rsyc_boundaries(cache_dir = cache)), "try-error")) { districts <- rsyc_boundaries("ecodistrict", cache_dir = cache) } }
A table containing one row for each published remote sensing-based yield curve. It includes aboveground biomass and total-volume curves fitted across Canada and within individual regions. Curves are available for tiles and four levels of Canada's ecological land classification.
RSYC_modelsRSYC_models
A table with 27,208 rows and 42 columns:
Unique name for the curve and the RSYC release in which it was published.
Forest measure (agb or volume) and its
units.
Type and name of the area represented by the curve.
Raw
identifiers for the four levels of the ecological hierarchy.
ecoprovince_id is stored as character; the other three are integers.
Fields above the row's ecological level, and all four fields for tile
rows, may be missing.
Whether the curve was fitted across Canada or within a region, and the region name where applicable.
Species code or broad species group.
Curve equation and age range. Published RSYC curves were fitted for stand ages 1 to 150 years.
Chapman-Richards curve coefficients.
Measures of uncertainty around the fitted curve.
Variance components and parent effects used by local calibration and retained for model provenance.
Checks recorded while each curve was fitted.
Number of observations and forest units, together with checks used to decide whether the curve was suitable for publication.
RSYC-Canada model products, version v20260923, upstream Git commit
c799aba24b5d99a6a7953a4dcab1dd73b0925c2c; source RDS SHA-256
193ebfc1f3279ffc278d84c917d206b4b4bcaeae95f38acf25d9c84a040bd1d5.
subset( RSYC_models, response == "volume" & strata_level == "ecozone" & species == "PICE.MAR" )subset( RSYC_models, response == "volume" & strata_level == "ecozone" & species == "PICE.MAR" )
List Species Available in RSYC Models
rsyc_species(response = NULL, strata_level = NULL, strata_id = NULL)rsyc_species(response = NULL, strata_level = NULL, strata_id = NULL)
response |
One or both forest measures: |
strata_level |
One or more types of area: |
strata_id |
One or more tile IDs, ecological area names or paths, or
ecological codes. Tile IDs, names, and paths are matched ignoring case.
Numeric values and numeric-looking character values are
interpreted as codes when no name or path matches. Code searches require
exactly one ecological |
A table giving each species code, common name, and broad model group.
rsyc_species(response = "agb", strata_level = "ecoregion")rsyc_species(response = "agb", strata_level = "ecoregion")
List Areas Available in RSYC Models
rsyc_strata(response = NULL, species = NULL, strata_level = NULL)rsyc_strata(response = NULL, species = NULL, strata_level = NULL)
response |
One or both forest measures: |
species |
One or more species codes or broad groups. Uppercase and lowercase letters are treated the same. The default includes all species. Unknown species codes produce a warning. |
strata_level |
One or more types of area: |
A table with the short area name (strata_name), its full location
within Canada's ecological classification (strata_id), and its canonical
character strata_code. Tile rows have NA codes.
rsyc_strata( response = "volume", species = "PICE.MAR", strata_level = "ecozone" )rsyc_strata( response = "volume", species = "PICE.MAR", strata_level = "ecozone" )
A model-aligned GeoPackage containing one polygon or multipolygon for each
of the 385 tile IDs used by the v20260923 national RSYC models. The path can
be obtained with system.file("extdata", "RSYC_tiles.gpkg", package = "RSYC") and read with sf::st_read().
List the species codes and common names represented in the published RSYC curves. Broad groups are listed first, followed by individual species.
species_codes(response = NULL, strata_level = NULL)species_codes(response = NULL, strata_level = NULL)
response |
Forest measure to include: |
strata_level |
Type of area to include. By default, all types are included. |
A table with the species code and common name.
species_codes() species_codes(response = "volume", strata_level = "ecoregion")species_codes() species_codes(response = "volume", strata_level = "ecoregion")