autoplot: Autoplot methods for Crunch Objects

autoplotR Documentation

Autoplot methods for Crunch Objects

Description

The Crunch autoplot methods generate ggplots that are tailored to various Crunch objects. This allows you to visualize the object without bringing it into memory. You can select between three families of plots, which will attempt to accomodate the dimensionality of the plotted object. These plots can be further extended and customized with other ggplot methods.

Usage

## S3 method for class 'DatetimeVariable'
autoplot(object, ...)

## S3 method for class 'NumericVariable'
autoplot(object, ...)

## S3 method for class 'CategoricalVariable'
autoplot(object, ...)

## S3 method for class 'CategoricalArrayVariable'
autoplot(object, ...)

## S3 method for class 'MultipleResponseVariable'
autoplot(object, ...)

## S3 method for class 'CrunchCube'
autoplot(object, ...)

## S3 method for class 'CrunchCubeCalculation'
autoplot(object, plot_type = "dot", ...)

## S3 method for class 'tbl_crunch_cube'
autoplot(object, plot_type = c("dot", "tile", "bar"), measure, ...)

Arguments

object

A Crunch variable or cube aggregation

...

additional plotting arguments

plot_type

One of "dot", "tile", or "bar" which indicates the plot family you would like to use. Higher dimensional plots add color coding or facets depending on the dimensionality of the data.

measure

The measure you wish to plot. This will usually be "count", the default but can also be ".unweighted_counts" or any other measure stored in the cube. If omitted, autoplot will select the first measure appearing in the data.

Value

A ggplot object.


crplyr documentation built on March 31, 2023, 9:30 p.m.