lords_divisions: lords_divisions

Description Usage Arguments Examples

View source: R/lords_divisions.R

Description

Imports data on House of Lords divisions

Usage

1
2
3
lords_divisions(division_id = NULL, summary = FALSE,
  start_date = "1900-01-01", end_date = Sys.Date(), extra_args = NULL,
  tidy = TRUE)

Arguments

division_id

The id of a particular vote. If empty, returns a data frame with information on all lords divisions. Defaults to NULL.

summary

If TRUE, returns a small data frame summarising a division outcome. Otherwise returns a data frame with details on how each peer voted. Has no effect if 'division_id' is empty. Defaults to FALSE.

start_date

The earliest date to include in the data frame, if calling all divisions. Defaults to '1900-01-01'.

end_date

The latest date to include in the data frame, if calling all divisions. 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

x <- lords_divisions(division_id = 705891, summary = TRUE)

x <- lords_divisions(division_id = 705891, summary = FALSE)

# Return all lords divisions in 2016
x <- lords_divisions(NULL, FALSE, start_date = '2016-01-01', end_date = '2016-12-31')


## End(Not run)

hansard documentation built on May 19, 2017, 8:16 a.m.

Search within the hansard package
Search all R packages, documentation and source code