get_proposal_votes {stortingscrape}R Documentation

Retreive all votes for a specified vote proposal

Description

A function for retrieving all votes from a specific vote proposal. Vote data are only available from the 2011-2012 session

Usage

get_proposal_votes(voteid = NA, good_manners = 0)

Arguments

voteid

Character string indicating the id of the vote to request all votes from

good_manners

Integer. Seconds delay between calls when making multiple calls to the same function

Value

A list with two elements:

  1. $proposal_vote (main data on the vote proposal)

    response_date Date of data retrieval
    version Data version from the API
    vote_id Id of the vote
  2. $proposal_by_parties${proposal_id} (what parties (id) stood behind proposal(s))

See Also

get_vote get_decision_votes get_result_vote

Examples


## Not run: 

prop <- get_proposal_votes(7523)
prop

for(i in 1:length(prop$proposal_by_parties)){
    prop$proposal_vote$parties[i] <- paste0(prop$proposal_by_parties[[i]], 
                                            collapse = ", ")

}


## End(Not run)



[Package stortingscrape version 0.3.0 Index]