mnis_joined_between: Members who joined between two dates.

Description Usage Arguments Value Examples

View source: R/mnis_joined_between.R

Description

Function returns all members who took their seats in the house between two given dates.

Usage

1
2
3
4
5
6
7
8
9
mnis_joined_between(
  start_date = "1900-01-01",
  end_date = Sys.Date(),
  house = "all",
  party = NULL,
  eligible = "all",
  tidy = TRUE,
  tidy_style = "snake_case"
)

Arguments

start_date

The start date of the search, 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 '1900-01-01'.

end_date

The end date of the search. 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 the current system date.

house

The house to which the member belongs. Accepts one of 'all', 'lords' and 'commons'. This parameter is not case sensitive. Defaults to 'all'.

party

All members from a given party who joined between the two dates. The party name must be fully spelled out (e.g. 'green party'), the API does not accept searches on this parameter. For a tibble of parties, see ref_parties(). This parameter is not case sensitive. Defaults to NULL.

eligible

If the member is currently eligible to sit. Accepts one of 'all', 'current', 'former'. This parameter is not case sensitive. Defaults to 'all'.

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 data on all members who joined between the two given dates.

Examples

1
2
3
4
5
6
7
## Not run: 
x <- mnis_joined_between(
  start_date = "2015-01-01",
  end_date = "2017-01-01", party = "labour"
)

## End(Not run)

mnis documentation built on April 4, 2021, 1:06 a.m.