house_carto {voteogram} | R Documentation |
Produce a ProPublica- or GovTrack-style House roll call vote cartogram
Description
Produce a ProPublica- or GovTrack-style House roll call vote cartogram
Usage
house_carto(
vote_tally,
style = c("pp", "gt", "propublica", "govtrack"),
pp_square = FALSE
)
Arguments
vote_tally |
either a |
style |
either ProPublica-ish ( |
pp_square |
if |
Value
a ggplot2
object that you can further customize with scales, labels, etc.
Note
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.
Examples
## Not run:
# what you'd normally do
rep <- roll_call("house", 115, 1, 256)
## End(Not run)
# using a saved object
rep <- readRDS(system.file("extdata", "rep.rds", package = "voteogram"))
house_carto(rep, pp_square = TRUE)