Generates a visual report of a dataset in an HTML bookdown document, with summary figures and statistics for each variable. The report outputs can be grouped by a categorical variable.
dataset_visualize(
dataset = tibble(id = as.character()),
bookdown_path,
data_dict = data_dict_extract(dataset),
group_by = NULL,
valueType_guess = FALSE,
taxonomy = NULL,
dataset_name = .dataset_name,
dataset_summary = .summary_var,
.summary_var = NULL,
.dataset_name = NULL
)
A dataset object.
A character string identifying the folder path where the bookdown report files will be saved.
A list of data frame(s) representing metadata of the input dataset. Automatically generated if not provided.
A character string identifying the column in the dataset to use as a grouping variable. Elements will be grouped by this column.
Whether the output should include a more accurate valueType that could be applied to the dataset. FALSE by default.
An optional data frame identifying a variable classification schema.
A character string specifying the name of the dataset
(used internally in the function dossier_evaluate()
).
A list which identifies an existing
summary produced by dataset_summarize()
of the dataset.
Using this parameter can save time in generating the visual report.
A folder containing files for the bookdown site. To open the bookdown site
in a browser, open 'docs/index.html', or use bookdown_open()
with the
folder path.
A dataset is a data table containing variables. A dataset object is a data frame and can be associated with a data dictionary. If no data dictionary is provided with a dataset, a minimum workable data dictionary will be generated as needed within relevant functions. Identifier variable(s) for indexing can be specified by the user. The id values must be non-missing and will be used in functions that require it. If no identifier variable is specified, indexing is handled automatically by the function.
A data dictionary contains the list of variables in a dataset and metadata
about the variables and can be associated with a dataset. A data dictionary
object is a list of data frame(s) named 'Variables' (required) and
'Categories' (if any). To be usable in any function, the data frame
'Variables' must contain at least the name
column, with all unique and
non-missing entries, and the data frame 'Categories' must contain at least
the variable
and name
columns, with unique combination of
variable
and name
.
The valueType is a declared property of a variable that is required in certain functions to determine handling of the variables. Specifically, valueType refers to the OBiBa data type of a variable. The valueType is specified in a data dictionary in a column 'valueType' and can be associated with variables as attributes. Acceptable valueTypes include 'text', 'integer', 'decimal', 'boolean', datetime', 'date'. The full list of OBiBa valueType possibilities and their correspondence with R data types are available using valueType_list. The valueType can be used to coerce the variable to the corresponding data type.
A taxonomy is a classification schema that can be defined for variable
attributes. A taxonomy is usually extracted from an
Opal environment, and a
taxonomy object is a data frame that must contain at least the columns
taxonomy
, vocabulary
, and terms
. Additional details about Opal
taxonomies are
available online.
{
# You can use our demonstration files to run examples
library(fs)
library(dplyr)
dataset <- madshapR_DEMO$dataset_TOKYO['height'] %>% slice(0)
dataset_summary <- madshapR_DEMO$`dataset_summary`
if(dir_exists(tempdir())) dir_delete(tempdir())
bookdown_path <- tempdir()
dataset_visualize(
dataset,
dataset_summary = dataset_summary,
bookdown_path = bookdown_path)
# To open the file in browser, open 'bookdown_path/docs/index.html'.
# Or use bookdown_open(bookdown_path) function.
}
#> 1/15
#> 2/15 [unnamed-chunk-1]
#> 3/15
#> 4/15 [unnamed-chunk-2]
#> 5/15
#> 6/15 [unnamed-chunk-3]
#> 7/15
#> 8/15 [unnamed-chunk-4]
#> 9/15
#> 10/15 [unnamed-chunk-5]
#> 11/15
#> 12/15 [unnamed-chunk-6]
#> 13/15
#> 14/15 [figures-plot12-1]
#> 15/15
#> "C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS bookdownproj.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output bookdownproj.html --lua-filter "C:\Users\guill\AppData\Local\R\win-library\4.3\bookdown\rmarkdown\lua\custom-environment.lua" --lua-filter "C:\Users\guill\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\guill\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --lua-filter "C:\Users\guill\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\anchor-sections.lua" --metadata-file "C:\Users\guill\AppData\Local\Temp\RtmpWq2gWl\file2d98542f1782" --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\guill\AppData\Local\R\win-library\4.3\bookdown\templates\gitbook.html" --highlight-style pygments --number-sections --css style.css --mathjax --include-in-header "C:\Users\guill\AppData\Local\Temp\RtmpWq2gWl\rmarkdown-str2d9812417652.html"
#>
#>
#> To edit your file, You can use the function `bookdown_open('C:\Users\guill\AppData\Local\Temp\RtmpWq2gWl')`
#> (Compatibility tested on Chrome, Edge and Mozilla)
#>