Learn R Programming

hansard (version 0.5.0)

mp_edms: Imports data on early day motions in signed, sponsored or primarily sponsored by a given MP.

Description

Imports data on early day motions in signed, sponsored or primarily sponsored by a given MP.

Usage

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

hansard_mp_edms(mp_id = NULL, primary_sponsor = TRUE, sponsor = FALSE, signatory = FALSE, full_data = FALSE, extra_args = NULL, tidy = TRUE, tidy_style = "snake_case")

Arguments

mp_id

The ID number of an MP. Required parameter, defaults to NULL.

primary_sponsor

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

sponsor

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

signatory

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

full_data

If TRUE, returns all available data on the EDMs signed or sponsored by a member. Defaults to FALSE. Note that this can be a very slow process compared to other hansard functions.

extra_args

Additional parameters to pass to API. Defaults to NULL.

tidy

Fix the variable names in the tibble to remove special characters and superfluous text, and converts the variable names to a consistent style. Defaults to TRUE.

tidy_style

The style to convert variable names to, if tidy = TRUE. Accepts one of 'snake_case', 'camelCase' and 'period.case'. Defaults to 'snake_case'.

Value

A tibble with information on the tibbles signed, sponsored or primarily sponsored by the given MP.

See Also

early_day_motions

Examples

Run this code
# NOT RUN {
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