Learn R Programming

hansard (version 0.4.0)

lord_vote_record: lord_vote_record

Description

Accepts an ID number for a member of the House of Commons, and returns a data frame of their votes.

Usage

lord_vote_record(peer_id = NULL, lobby = "all", start_date = "1900-01-01",
  end_date = Sys.Date(), extra_args = NULL, tidy = TRUE)

Arguments

peer_id

The ID number of a member of the House of Lords.

lobby

Accepts one of 'all', 'content', 'notcontent'. 'content' returns votes where the peer voted 'content', 'notcontent' returns votes where the peer voted 'notcontent', 'all' returns all available votes by the peer. Defaults to 'all'.

start_date

The earliest date to include in the data frame. Defaults to '1900-01-01'.

end_date

The latest date to include in the data frame. Defaults to current system date.

extra_args

Additional parameters to pass to API. Defaults to NULL.

tidy

Fix the variable names in the data frame to remove extra characters, superfluous text and convert variable names to snake_case. Defaults to TRUE.

Examples

Run this code

x <- lord_vote_record(530, lobby='all')

x <- lord_vote_record(530, lobby='content')

x <- lord_vote_record(530, lobby='notcontent')

Run the code above in your browser using DataLab