knitr::opts_chunk$set(include = TRUE, echo = FALSE, eval = TRUE)
data <- params$data
data_quality <- audit_global(data = data, numeric_cutoff = params$numeric_cutoff, na_type = params$na_type) quality_info <- data_quality$global quality_output <- data_quality$table
The table has r quality_info$n_cols
columns and r quality_info$n_rows
rows (r quality_info$n_unique
are unique). There are r round(quality_info$n_missing / (quality_info$n_cols * quality_info$n_rows) * 100, digits = 0)
% missing values in the dataset.
if (!is.null(params$na_threshold)) { quality_output$percent <- quality_output$`Percentage of missing values` quality_output$`Percentage of missing values` <- color_bar( color = ifelse( quality_output$percent <= params$na_threshold[1], "lightgreen", ifelse( quality_output$percent > params$na_threshold[2], "indianred", "orange" ) ), fun = function(x) x / max(x) )(quality_output$percent) quality_output$percent <- NULL }
kable(x = quality_output, format = "html", escape = FALSE, digits = 2, format.args = list(decimal.mark = ".", big.mark = " ")) %>% kable_styling(bootstrap_options = c("striped", "hover", "responsive"), full_width = F, position = "center")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.