Retrieve vote results on MP level for a specified vote
Source:R/get_result_vote.R
get_result_vote.Rd
A function for retrieving vote results from a specific vote on MP level. Vote data are only available from the 2011-2012 session. Needs some preprocessing for use with rollcall packages, such as ideal.
Value
A data.frame with the following variables:
response_date | Date of data retrieval |
version | Data version from the API |
vote_id | Id of vote |
mp_id | MP id |
party_id | Party id |
vote | Vote: for, mot (against), ikke_tilstede (absent) |
permanent_sub_for | Id of the MP originally holding the seat, if the substitute is permanent |
sub_for | Id of the MP originally holding the seat |
Examples
if (FALSE) { # \dontrun{
v <- get_result_vote(12345)
table(v$vote)
p <- get_proposal_votes(12345)
stringr::str_replace_all(p$proposal_vote$proposal_text,
"\\<(.*)\\>|\\r\\n", "") |>
stringr::str_trim()
} # }