This function creates an interactive side-by-side visual comparison of the different
WISPstation data processing levels. Using plotly submodules, it enables the
visualization of up to three aligned plots within a single interactive window:
native data downloaded directly from WISPstation, processed data after QC,
processed data after SR. This provides a powerful tool for visually assessing
how filtering and correction algorithms modify spectral signatures, remove
artifacts, and improve data quality.
Usage
wisp_plot_comparison(
raw_data = NULL,
qc_data = NULL,
sr_data = NULL,
raw_args = NULL,
qc_args = NULL,
sr_args = NULL
)Arguments
- raw_data
A
tibble. The original data obtained bywisp_get_reflectance_data(). Default isNULL. At least one ofraw_data,qc_data, orsr_datamust be provided.- qc_data
A
tibble. The data afterwisp_qc_reflectance_data()operations. Default isNULL.- sr_data
A
tibble. The data afterwisp_sr_reflectance_data()operations. Default isNULL.- raw_args
A
listof arguments to be passed towisp_plot_reflectance_data()for the raw data plot (legend). Default isNULL.- qc_args
A
listof arguments to be passed towisp_plot_reflectance_data()for the QC data plot (legend). Default isNULL.- sr_args
A
listof arguments to be passed towisp_plot_reflectance_data()for the SR data plot (legend). Default isNULL.
Value
A plotly object comparing the spectral signatures of whichever of
raw_data, qc_data, and sr_data were provided (1 to 3 panels, always
ordered WISPstation native, then QC, then SR). The plot title reflects
exactly which of them are shown, e.g. "Reflectance: QC" for a single
dataset, or "Reflectance comparison: WISPstation vs SR" for two.
Author
Alessandro Oggioni, phD alessandro.oggioni@cnr.it
Nicola Ghirardi, phD nicola.ghirardi@cnr.it
Examples
if (interactive()) {
custom_raw <- list(legend_TSM = FALSE, legend_Chla = FALSE)
custom_qc <- list(legend_TSM = TRUE, legend_Chla = TRUE, legend_Kd = FALSE)
custom_sr <- list(legend_TSM = TRUE, legend_mishra_CHL = FALSE)
fig_comparison <- wisp_plot_comparison(
raw_data = reflect_data,
qc_data = reflect_data_qc,
sr_data = reflect_data_sr,
raw_args = custom_raw,
qc_args = custom_qc,
sr_args = custom_sr
)
print(fig_comparison)
}