Install the stable version of sgsR
from
CRAN with:
install.packages("sgsR")
library(sgsR)
Install the most recent development version of sgsR
from
Github with:
install.packages("devtools")
::install_github("https://github.com/tgoodbody/sgsR")
devtoolslibrary(sgsR)
sgsR
provides a collection of stratification and
sampling algorithms that use auxiliary information for allocating sample
units over an areal sampling frame. ALS metrics, like those derived from
the lidR
package are the intended inputs.
Other remotely sensed or auxiliary data can also be used (e.g. optical satellite imagery, climate data, drone-based products).
sgsR
is being actively developed, so you may encounter
bugs. If that happens, please report your issue
here by providing a reproducible example.
#--- Load mraster files ---#
<- system.file("extdata", "mraster.tif", package = "sgsR")
r
#--- load the mraster using the terra package ---#
<- terra::rast(r)
mraster
#--- apply quantiles algorithm to mraster ---#
<- strat_quantiles(mraster = mraster$zq90, # use mraster as input for stratification
sraster nStrata = 4) # produce 4 strata
#--- apply stratified sampling ---#
<- sample_strat(sraster = sraster, # use sraster as input for sampling
existing nSamp = 200, # request 200 samples
mindist = 100, # samples must be 100 m apart
plot = TRUE) # plot output
Check out the
package documentation to see how you can use sgsR
functions for your work.
sgsR
was presented at the ForestSAT 2022 Conference in
Berlin. Slides
for the presentation can be found here.
We are thankful for continued collaboration with academic, private
industry, and government institutions to help improve sgsR
.
Special thanks to to:
Collaborator | Affiliation |
---|---|
Martin Queinnec | University of British Columbia |
Joanne C. White | Canadian Forest Service |
Piotr Tompalski | Canadian Forest Service |
Andrew T. Hudak | United States Forest Service |
Ruben Valbuena | Swedish University of Agricultural Sciences |
Antoine LeBoeuf | Ministère des Forêts, de la Faune et des Parcs |
Ian Sinclair | Ministry of Northern Development, Mines, Natural Resources and Forestry |
Grant McCartney | Forsite Consultants Ltd. |
Jean-Francois Prieur | Université de Sherbrooke |
Murray Woods | (Retired) Ministry of Northern Development, Mines, Natural Resources and Forestry |
Development of sgsR
was made possible thanks to the
financial support of the Canadian Wood Fibre Centre’s Forest Innovation
Program.