R/gghouse.r
house_carto.Rd
Produce a ProPublica- or GovTrack-style House roll call vote cartogram
house_carto(vote_tally, style = c("pp", "gt", "propublica", "govtrack"), pp_square = FALSE)
vote_tally | either a |
---|---|
style | either ProPublica-ish ( |
pp_square | if |
a ggplot2
object that you can further customize with scales, labels, etc.
No "themeing" is applied to the returned ggplot2 object. You can use theme_voteogram()
if you need a base theme. Also, GovTrack-style cartograms will have coord_equal()
applied by default.
# NOT RUN { # what you'd normally do rep <- roll_call("house", 115, 1, 256) # }# NOT RUN { # using a saved object rep <- readRDS(system.file("extdata", "rep.rds", package="voteogram")) house_carto(rep, pp_square=TRUE) # }