getMP: getMPs

Description Usage Arguments Value Examples

View source: R/getMP.R

Description

Fetch a particular MP.

Usage

1
getMP(postcode = NA, constituency = NA, id = NA, always_return = NA)

Arguments

postcode

Fetch the MP for a particular postcode (either the current one, or the most recent one, depending upon the setting of the always_return variable). This will only return their current/ most recent entry in the database, look up by ID to get full history of a person. (optional)

constituency

The name of a constituency; we will try and work it out from whatever you give us. This will only return their current/ most recent entry in the database, look up by ID to get full history of a person. (optional)

id

If you know the person ID for the member you want (returned from getMPs or elsewhere), this will return data for that person. This will return all database entries for this person, so will include previous elections, party changes, etc. (optional)

always_return

For the postcode and constituency options, sets whether to always try and return an MP, even if the seat is currently vacant (due to e.g. the death of an MP, or the period before an election when there are no MPs).

Value

list of MPs and offices

Examples

1

jblumenau/twfyR documentation built on Oct. 25, 2019, 7:13 a.m.