mnis_mps_on_date: All MPs between two dates

Description Usage Arguments Value See Also Examples

View source: R/mnis_mps_on_date.R

Description

Requests data on all MPs who were members of the House of Commons on the date specified, (if only date1 is included as a parameter), or on or between the two dates if both date1 and date2 are specified. Either date1 or date2 can be the latter of the two dates.

Usage

1
2
mnis_mps_on_date(date1 = Sys.Date(), date2 = NULL, tidy = TRUE,
  tidy_style = "snake_case")

Arguments

date1

The date to return the list of mps from. Accepts character values in 'YYYY-MM-DD' format, and objects of class Date, POSIXt, POSIXct, POSIXlt or anything else than can be coerced to a date with as.Date(). Defaults to current system date.

date2

An optional query parameter. Accepts character values in 'YYYY-MM-DD' format, and objects of class Date, POSIXt, POSIXct, POSIXlt or anything else than can be coerced to a date with as.Date(). If not NULL, the function returns a list of all MPs who were members between date1 and date2. Defaults to NULL.

tidy

If TRUE, fixes the variable names in the tibble to remove non-alphanumeric characters and superfluous text, and convert 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 all MPs who were members of the House of Commons on the date specificed (if only date1 is included as a parameter), or on or between the two dates if both date1 and date2 are specified.

See Also

mnis_party_state

mnis_peers_on_date

Examples

1
2
3
4
## Not run: 
x <- mnis_mps_on_date(date1='2017-01-01', date2='2014-02-04')

## End(Not run)

EvanOdell/mnis documentation built on March 21, 2018, 10:52 p.m.