speech_rollcall: Detects roll-call

View source: R/speech_rollcall.R

speech_rollcallR Documentation

Detects roll-call

Description

Detects roll-call in floor speeches and converts them to a dataset.

Returns a summary of a rollcall vote object.

Usage

speech_rollcall(file, add.error.sir = NULL, rm.error.leg = NULL)

## S3 method for class 'nominal'
summary(object, ...)

Arguments

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 NULL.

rm.error.leg

character vector. It allows to add legislator's names to be eliminated. By default it is NULL. By default, "PRESIDENTE", "SECRETARIO", "SUBSECRETARIO", and "MINISTRO" are eliminated.

object

an object of class nominal, the output of speech_rollcall.

...

additional parameter.

Details

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.

Value

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

Examples


# url <- speech::speech_url(chamber = "D", from = "14-04-2004", to = "14-04-2004")
# out <- speech_rollcall(file = url)
# summary(out)


speech documentation built on Oct. 4, 2022, 1:07 a.m.