Draws a Pareto Chart
draw_pareto_chart(
data,
cat_var,
summarize = FALSE,
continuous_var,
drop_na = TRUE,
highlight_first_n_items = 0,
lump_last_n_items = 0,
lumped_cat_name = "Other",
column_fill = scale_fill_sherlock(3),
scale = "numeric",
accuracy = 1,
title_label = "Pareto Chart",
analysis_desc_label = NULL,
axis_text_size = 10
)
A 'ggplot' object
input dataset to be plotted (required)
Categorical variable (required)
Logical. If FALSE, default, the function expects total counts of each category of the categorical variable. If TRUE, individual values within each category are automatically summed up and ranked. (required)
Continuous variable to rank by (e.g. sum, frequency etc.). Not required if summarize argument is set to TRUE. (required)
Logical. If TRUE, default, NA values of the categorical variable are dropped. (required)
Specify the top n items to be highlighted. By default, it is set to 0. (optional)
Specify the last n items to be lumped into one category. By default, it is set to 0. (optional)
Name lumped category. By default, it is set to "Other". (optional)
Column fill color. By default, it is set to scale_fill_sherlock(3) (optional)
Specify an acceptable argument for scale. Acceptable arguments are "numeric", "percent", "dollar", "dollar-k" or "dollar-M". By default, it is set to "numeric" (optional)
Number to round to. Default value is set to 1. If NULL, values will be rounded to the nearest integer. (optional)
Specify plot title. By default, it is set to display "Pareto Chart" (optional)
Specify plot analysis desc label (subtitle). By default, it is set to display CONTINUOUS VARIABLE COLUMN NAME "by" CATEGORICAL VARIABLE COLUMN NAME (optional)
Set axis text size. By default, it is set at 10. (optional)