View source: R/speech_rollcall.R
| speech_rollcall | R Documentation |
Detects roll-call in floor speeches and converts them to a dataset.
Returns a summary of a rollcall vote object.
speech_rollcall(file, add.error.sir = NULL, rm.error.leg = NULL) ## S3 method for class 'nominal' summary(object, ...)
file |
list or character vector specifying the path or URL to a PDF file. It can be one or more files. |
add.error.sir |
character vector. It allows to specify different ways in which
the term that orders the speeches could be miswritten: sir. By default it is |
rm.error.leg |
character vector. It allows to add legislator's names
to be eliminated. By default it is |
object |
an object of class |
... |
additional parameter. |
This function detects roll-call votes on floor speeches. It only detects votes where the vote can be affirmative or negative. This leaves out a set of roll-call votes, such as those for the allocation of positions in the chamber.
data.frame with the following variables:
legislator: Name of the legislator
vote: Voting, 1 = affirmative, 0 = Negative
argument:If the legislator justifies the vote, it is worth 1, otherwise 0.
speech: Speech
chamber: Chamber
date: Date
legislature: Legislature
rollcall: Number of roll-call in session
id: Id
sex: Sex of legislator
data.frame with the following variables:
Chamber: Chamber
Date: Date
Legislators: Number of legislators in the voting
Affirmative: Number of affirmative votes
Negative: Number of negative votes
prop_AF: Proportion of affirmative votes
prop_NG: Proportion of negative votes
prop_women: Proportion of women in the voting
prop_arg: Proportion of legislators justifying the vote
rc: Number of roll-call in session
# url <- speech::speech_url(chamber = "D", from = "14-04-2004", to = "14-04-2004") # out <- speech_rollcall(file = url) # summary(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.