Description Usage Arguments Details Value
apportion()
simulates U.S. congressional apportionment with a state-level
population data set you provide.
1 2 3 |
pop_data |
A data frame of population values for each state. State names will be internally coerced to uppercase. |
total_seats |
The total number of voting seats in the hypothetical congress. This number was fixed at the default (435) in 1911. |
apportion_year |
A character string (or coercible) indicating the year of apportionment to simulate.
For now, this parameter affects only the number of states in the union, not the apportionment method,
so you're better off just supplying |
DC_seats |
A logical indicating whether to allocate voting seats to Washington, D.C. |
PR_seats |
A logical indicating whether to allocate voting seats to Puerto Rico. |
GU_seats |
A logical indicating whether to allocate voting seats to Guam. |
min_seats |
The minimum (starting) number of seats per state. The default is 1. |
store_priority |
A logical indicating whether to store the priority scores calculated for each state-seat combination.
Scores are stored as a wide |
store_seat_order |
A logical indicating whether to store state names in the order that seats were allocated.
The seat order is stored as a character vector named |
Currently, apportion()
can implement only the
https://www.census.gov/population/apportionment/about/computing.htmlmethod of equal proportions.
This method has been used since 1941. Support for obsolete methods may be added later.
A two-column data.table
containing the name of each state and the number of seats allocated to it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.