Learn R Programming

hansard (version 0.4.0)

members: members

Description

Imports data on all current and former Members of Parliament including the Lords and the Commons

Imports data on all current and former MPs

Imports data on all current and former peers

Usage

members(ID = NULL, extra_args = NULL, tidy = TRUE)

commons_members(extra_args = NULL, tidy = TRUE)

lords_members(extra_args = NULL, tidy = TRUE)

lords_interests(peer_id = NULL, extra_args = NULL, tidy = TRUE)

Arguments

ID

The ID of a member of the House of Commons or the House of Lords. Defaults to NULL. If NULL, returns a data frame of all members. If not NULL, returns a data frame with basic information on that member.

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.

peer_id

The ID of a member of the house of lords. If NULL, returns a data frame with all listed financial interests for all members. Defaults to NULL.

Examples

Run this code

x <- members(172)

x <- commons_members()

x <- lords_members()

x <- lords_interests(530)

Run the code above in your browser using DataLab