diagnose_web_report | R Documentation |
The diagnose_web_report() report the information for diagnosing the quality of the data.
diagnose_web_report(.data, ...)
## S3 method for class 'data.frame'
diagnose_web_report(
.data,
output_file = NULL,
output_dir = tempdir(),
browse = TRUE,
title = "Data Diagnosis",
subtitle = deparse(substitute(.data)),
author = "dlookr",
title_color = "gray",
thres_uniq_cat = 0.5,
thres_uniq_num = 5,
logo_img = NULL,
create_date = Sys.time(),
theme = c("orange", "blue"),
sample_percent = 100,
is_tbl_dbi = FALSE,
base_family = NULL,
...
)
.data |
a data.frame or a |
... |
arguments to be passed to methods. |
output_file |
name of generated file. default is NULL. |
output_dir |
name of directory to generate report file. default is tempdir(). |
browse |
logical. choose whether to output the report results to the browser. |
title |
character. title of report. default is "Data Diagnosis Report". |
subtitle |
character. subtitle of report. default is name of data. |
author |
character. author of report. default is "dlookr". |
title_color |
character. color of title. default is "gray". |
thres_uniq_cat |
numeric. threshold to use for "Unique Values - Categorical Variables". default is 0.5. |
thres_uniq_num |
numeric. threshold to use for "Unique Values - Numerical Variables". default is 5. |
logo_img |
character. name of logo image file on top left. |
create_date |
Date or POSIXct, character. The date on which the report is generated. The default value is the result of Sys.time(). |
theme |
character. name of theme for report. support "orange" and "blue". default is "orange". |
sample_percent |
numeric. Sample percent of data for performing Diagnosis. It has a value between (0, 100]. 100 means all data, and 5 means 5% of sample data. This is useful for data with a large number of observations. |
is_tbl_dbi |
logical. whether .data is a tbl_dbi object. |
base_family |
character. The name of the base font family to use for the visualization. If not specified, the font defined in dlookr is applied. (See details) |
Generate generalized data diagnostic reports automatically. This is useful for diagnosing a data frame with a large number of variables than data with a small number of variables.
No return value. This function only generates a report.
Reported from the data diagnosis is as follows.
Overview
Data Structures
Data Structures
Data Types
Job Information
Warnings
Variables
Missing Values
List of Missing Values
Visualization
Unique Values
Categorical Variables
Numerical Variables
Outliers
Samples
Duplicated
Heads
Tails
The base_family is selected from "Roboto Condensed", "Liberation Sans Narrow", "NanumSquare", "Noto Sans Korean". If you want to use a different font, use it after loading the Google font with import_google_font().
diagnose_web_report.tbl_dbi
.
if (FALSE) {
# create dataset
heartfailure2 <- dlookr::heartfailure
heartfailure2[sample(seq(NROW(heartfailure2)), 20), "sodium"] <- NA
heartfailure2[sample(seq(NROW(heartfailure2)), 5), "smoking"] <- NA
heartfailure2[sample(seq(NROW(heartfailure2)), 2), "time"] <- 0
heartfailure2[sample(seq(NROW(heartfailure2)), 1), "creatinine"] <- -0.3
# create pdf file. file name is Diagnosis_Report.html
diagnose_web_report(heartfailure2)
# file name is Diagn.html. and change logo image
logo <- file.path(system.file(package = "dlookr"), "report", "R_logo_html.svg")
diagnose_web_report(heartfailure2, logo_img = logo, title_color = "black",
output_file = "Diagn.html")
# file name is ./Diagn_heartfailure.html, "blue" theme and not browse
diagnose_web_report(heartfailure2, output_dir = ".", author = "Choonghyun Ryu",
output_file = "Diagn_heartfailure.html", theme = "blue", browse = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.