senate_carto: Produce a Senate cartogram

Description Usage Arguments Value Note Examples

View source: R/ggsenate.r

Description

Produce a Senate cartogram

Usage

1
senate_carto(vote_tally)

Arguments

vote_tally

either a pprc object (the result of a call to roll_call()) or a data.frame of vote tallies for the senate. It expects 3 columns. state_abbrev : the 2-letter U.S. state abbreviation; district : either 1 or 2 to distinguish between each senator; party : R, D or ID; position : yes, no, present, none for how the senator voted.

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# what you'd normally do
sen <- roll_call("senate", 115, 1, 110)

## End(Not run)

# Using a saved object
sen <- readRDS(system.file("extdata", "sen.rds", package="voteogram"))

senate_carto(sen)

voteogram documentation built on May 2, 2019, 11:42 a.m.