gg_wfl: Waffle Plot of votes, colored

View source: R/viz_waffle.R

gg_wflR Documentation

Waffle Plot of votes, colored

Description

Waffle Plot of votes, colored

Usage

gg_wfl(
  tbl_indiv,
  var,
  nrows = 31,
  rev = FALSE,
  office_nam = NULL,
  blank = FALSE,
  legend = FALSE,
  title_size = 0.8,
  check_ncand = TRUE
)

Arguments

tbl_indiv

A wide dataset of individual votes

var

The variable in the dataset to use as the colors

nrows

number of rows and columns

office_nam

Title of the office. If NULL, use recode_abbrv of variable name

Examples

 ## Not run: 
   w_prez <- filter(wide, elec %in% c("2012-11-06", "2016-11-08"))
   gg_wfl(filter(w_prez, PRS_party == 1), USH_party, nrows = 10)
  
## End(Not run)


kuriwaki/ballot documentation built on May 1, 2023, 9:55 p.m.