Description Usage Arguments Value Examples
elect_count creates a chloropleth map of the United States on the state or county levelwith fill color based on voter turnout for the given presidential election year.
1 2 3 4 5 6 7 8 | elect_count(
level = "state",
Year,
states = c(),
pal = "YlOrRd",
log = TRUE,
...
)
|
level |
what region size to visualize (state or county). |
Year |
year. For built in election data, year must align with US election years. |
states |
list of states user wants to visualize. |
pal |
a color palette. |
log |
fill based on log of count. |
... |
pass other arguments |
a ggplot map object.
1 2 | elect_count()
elect_count(level="county", states = c("connecticut", "rhode island"), log=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.