Visualize bigrams with dots sized according to frequency.
visualize_bigram_freqs_at(..., token = NULL, facet = NULL, color = facet,
num_top = 3, point_max_size = 25,
scale_manual_base = default_scale_manual(), scale_manual_params = list(),
labs_base = default_labs(), labs_params = list(title =
"Most Frequently Used Word Pairs"), theme_base = default_theme(),
theme_params = list())
visualize_bigram_freqs(..., token, color, facet)
Arguments
... |
dots. Parameters to pass directly to visualize_time() . |
token |
bare for NSE; character for SE. Name of column in data to use as unit for counting.
Probably something like 'word' or 'bigram'. |
facet |
bare for NSE; character for SE. Name of column in data to use for facetting. |
color |
bare for NSE; character for SE. Name of column in data to use for color basis.
Even if fill is the actual ggplot2 aesthetic, the internal code will 'coerce' this
column to fill .
In order to simplify internal code, MUST be specified. |
num_top |
numeric. Number of words to show. If between 0 and 1, then assumed to be a percentage. |
point_max_size |
numeric. Passed directly to ggplot2::scale_size_area() for the point size. |
scale_manual_base |
list. Parameters to pass to ggplot2::scale_fill_manual() or
ggplot2::scale_color_manual() , depending on the aesthetic mapping. A default values
argument is specified in the internal
function default_scale_manual() ,
so if overwriting explicitly, then values should be included in the list. |
scale_manual_params |
list. Additional parameters to pass to ggplot2::scale_fill_manual()
or ggplot2::scale_color_manual() (e.g. breaks , labels , or name ).
The default values specified by scale_manual_base = default_scale_manual()
can be overwritten a values argument in this list (or directly with a
values argument in the scale_manual_base list. |
labs_base |
ggplot2::labs() function. Defaults to a pre-determined set of values.
It is recommended NOT to modify this argument; isntead, the _params argument should
be used for customization.
|
labs_params |
list. Additional parameters to pass to ggplot2::labs() to use in addition
to and/or override the parameters set in the _base parameter. |
theme_base |
ggplot2::theme() function. (e.g. as ggplot2::theme_minimal() .)
A custom theme is supplied as a default. As with the the labs_base argument, it is NOT
recommended to change this directly.
|
theme_params |
list. Additional parameters to pass to ggplot2::labs() .
Should be used in the same manner as labs_params for customization. |
Value
gg.
Details
compute_freqs_facet_at()
should NOT be called beforehand.
See also
https://buzzfeednews.github.io/2018-01-trump-twitter-wars/