make_chart: Make Interactive Charts

Description Usage Arguments

View source: R/make_chart.R

Description

Make interactive bar charts utilizing ggiraph.

Usage

1
2
3
4
5
make_chart(tbl, x = NULL, y = NULL, fill = NULL, facet = NULL,
  interactive = TRUE, order = FALSE, flip = FALSE,
  flat_print = FALSE, legend = TRUE, variable_labels = TRUE,
  palette = "Set1", confidence = 0.95, label_options = list(wrap =
  35, trunc = 100), ggiraph_options = list(), ...)

Arguments

tbl

data.table object returned by summarize_data.

x

character. Variable to be displayed along x-axis.

y

character. Either 'W' for weighted or 'U' for unweighted statistic.

fill

character. Variable to be categorized using interior coloring.

facet

logical. Variable to be categorized by faceted grid.

interactive

logical. Print as ggpplot object instead ggiraph object?

order

logical. Order by values instead of natural codebook order?

flip

logical. Flip x and y axes?

flat_print

logical. Print as ggpplot object instead ggiraph object?

legend

logical. Display a legend?

variable_labels

logical. Use variable labels/descriptions?

palette

character. A color pallete to be used for the fill variable. See pallete argument here scale_fill_brewer.

confidence

Confidence level for margin of error calculation. Defaults to 0.95. Set to NULL for standard error.

label_options

List of label options when variable_labels = TRUE. Number of characters before wrapping and truncating text, respectively.

ggiraph_options

Optional list of options to pass to ggiraph.

...

Optional formatting arguments. See format_values.


Westat-Transportation/summarizeNHTS documentation built on May 17, 2020, 8:57 p.m.