vgn4_others.RmdThis vignette presents two analyses of growth-related attributes: the Frequency Report summarizes sample distributions across spatial locations, while the Spatial–Temporal Report visualizes interpolated attributes over space and time.
The Frequency Report provides frequency distributions across locations, summarizing patterns at the site, tree, and sample levels, and highlighting data completeness, variability, and potential gaps for further analysis.
# loading processed data
# otherwise need to run CFS_format() first as done in data report
dt.samples_trt <- readRDS(system.file("extdata", "dt.samples_trt.rds", package = "growthTrendR"))
# Compute frequency statistics at radius level
dt.freq <- CFS_freq(
data = dt.samples_trt$tr_all_wide,
freq.label_data = "demo-samples",
freq.uid_level = "uid_radius"
)data
Metadata table generated by the function CFS_format().
freq.label_data
A short description of the dataset used. This text will appear in the report as the data source for the generated figures.
freq.uid_level
Specifies the hierarchical level at which frequencies are counted (e.g., site, tree, sample, or radius).
generate_report(robj = dt.freq)robj
The input for the frequency report is the output of the CFS_freq() function, which assigns the class “cfs_freq” to the resulting object.
output_file
The output_file argument allows users to generate an HTML report at a specified path and file name. If set to NULL (default), the report opens automatically in the browser.
This report presents an analysis of the distribution of samples
across geographical locations, stratified by species, providing insights
into sampling coverage and spatial patterns.
source data: demo-samples
uid level: uid_radius
cuttoff year: -999
Spatial resolution: 1 degree (longitude); 1 (latitude)
This report presents the spatial–temporal dynamics of growth-related attributes (e.g., ring width, basal area increment, chronology indices, or model-predicted values). The variables are interpolated across the study region using the CFS_mapping() function with the inverse distance weighting (IDW) method, and the resulting raster layers are compiled into a GIF for visualization.
# loading processed data
dt.samples_trt <- readRDS(system.file("extdata", "dt.samples_trt.rds", package = "growthTrendR"))
# data processing
cols.meta = c("uid_tree", "uid_site", "longitude", "latitude", "species")
dt.mapping <- dt.samples_trt$tr_all_wide[
, c(..cols.meta, as.character(1991:1995)), with = FALSE]
results_mapping <- CFS_mapping(data = dt.mapping, year.span = c(1991,1995))data
The input dataset must include at least five columns: uid_tree, uid_site, longitude, latitude, and species, followed by annual attribute columns labeled by year (e.g., 1991, 1992, …).
year.span
a short description of the input dataset.This text will appear in the report as data source for the generated figures.
# e.g. series to check
generate_report(robj = results_mapping,
png.text = list(
text_top = "Ring width measurment - ",
text_bott = "Source: demo-samples",
text_side = "ring width (mm)"
)
)robj
The input for the spatial-temporal report is the output of the CFS_mapping() function, which assigns the class “cfs_mapping” to the resulting object.
png.text
A list of text labels for the plot. Supported elements are text_top, text_bott, and text_side.
The following animation illustrates temporal patterns of a key
attribute across a geographic region. Values at discrete locations are
interpolated using the inverse distance weighting (IDW) method to create
continuous yearly surfaces. The animation provides a dynamic view of
spatio-temporal trends, highlighting patterns and potential anomalies in
the data.