wordcloud_mono_y2: Creates a word cloud from an open end question

View source: R/wordcloud_mono_y2.R

wordcloud_mono_y2R Documentation

Creates a word cloud from an open end question

Description

Finds the frequencies of each word in an open end question and creates a word cloud based on the frequencies. Words mentioned less are smaller

Usage

wordcloud_mono_y2(
  dataset,
  variable,
  colors = "#474E7E",
  max_size = 12,
  min_size = 1,
  font_family = "Flama",
  top_x = 50
)

Arguments

dataset

no default. Usually piped in from your main dataset

variable

The name of the openended variable from your dataset you want to look at

colors

DEFAULT = '#474E7E' (bluepurple from Qualtrics template). All words are the same color. Any color may be specified as a hexcode

max_size

DEFAULT = 12; the largest text size for the word with the highest frequency#' @keywords openend open end wordcloud word cloud

min_size

DEFAULT = 1; the smallest text size for the word with the lowest frequency

font_family

DEFAULT = 'Flama'; all fonts used need to be previously loaded in using the font_add() and showtext_auto() functions

top_x

DEFAULT = 50; Shows the top X most commonly mentioned words you want to see from the open-end

Examples

responses <- tibble::tibble(
  var1 = c(
    'I like to talk about dogs',
    'Dogs are cool but cats are aight too',
    'I prefer dogs over cats',
    "My dog's collars are always too tight",
    'One last sentence about dogs',
    'Cats collars are typically cooler than dogs'
  )
)

responses %>% wordcloud_mono_y2(var1, font_family = "Arial")
responses %>% wordcloud_mono_y2(var1, 'red', font_family = "Arial")

nick-moffitt/y2artisan documentation built on July 30, 2023, 5:40 p.m.