R/05-harmonized_data_visualize.R
harmonized_dossier_visualize.Rd
Generates a visual report of a harmonized dossier in an HTML bookdown document, with summary figures and statistics for each harmonized variable. The report outputs can be grouped by a categorical variable.
harmonized_dossier_visualize(
harmonized_dossier,
bookdown_path,
harmonized_dossier_summary = NULL
)
A list containing the harmonized dataset(s).
A character string identifying the folder path where the bookdown report files will be saved.
A list which identifies an existing
summary produced by harmonized_dossier_summarize()
of the harmonized
variables.
Using this parameter can save time in generating the visual report.
A folder containing files for the bookdown document. To open the bookdown document
in a browser, open 'docs/index.html', or use bookdown_open()
with the
folder path.
A harmonized dossier is a named list containing one or more data frames, which are harmonized datasets. A harmonized dossier is generally the product of applying processing to a dossier object. The name of each harmonized dataset (data frame) is taken from the reference input dataset. A harmonized dossier also contains the DataSchema and Data Processing Elements used in processing as attributes.
{
library(fs)
# Use Rmonize_examples to run examples.
# Perform data processing
harmonized_dossier <- Rmonize_examples$`harmonized_dossier`
harmonized_dossier_summary <- Rmonize_examples$`summary_report_harmonized_dossier`
# Create a folder where the visual report will be placed
if(dir_exists(tempdir())) dir_delete(tempdir())
bookdown_path <- tempdir()
# Generate the visual report
harmonized_dossier_visualize(
harmonized_dossier = harmonized_dossier,
bookdown_path = bookdown_path,
harmonized_dossier_summary = harmonized_dossier_summary)
# To open the file in a browser, open 'bookdown_path/docs/index.html'.
# Or use bookdown_open(bookdown_path) function.
}
#> Error: [EBUSY] Failed to remove 'C:/Users/guill/AppData/Local/Temp/RtmpGEuvsC/Rf4bac693374a3': resource busy or locked