Learn R Programming

hansard (version 0.4.0)

mp_edms: mp_edms

Description

Imports data on early day motions

Usage

mp_edms(mp_id = NULL, primary_sponsor = TRUE, sponsor = FALSE,
  signatory = FALSE, full_data = FALSE, extra_args = NULL, tidy = TRUE)

Arguments

mp_id

The ID number of an MP. Required parameter.

primary_sponsor

Returns a data frame of all early day motions where the given member is the primary sponsor. Defaults to TRUE.

sponsor

Returns a data frame of early day motions where the given member is the primary sponsor or a sponsor. Defaults to FALSE.

signatory

Returns a data frame of all early day motions signed by the given member. Because of the structure of the API, there is less information contained in the data frame return if signatory is TRUE, unless full_data is also TRUE. Defaults to FALSE.

full_data

Requests all available data on the EDMs signed or sponsored by a member. Defaults to FALSE. Note that this can be a very slow process.

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 <- mp_edms(mp_id=3967, primary_sponsor=TRUE, sponsor = FALSE, signatory=FALSE)

x <- mp_edms(mp_id=3967, primary_sponsor=TRUE, sponsor = FALSE, signatory=TRUE, full_data=TRUE)


Run the code above in your browser using DataLab