get_parlperiod_mps {stortingscrape} | R Documentation |
Get list of MPs in a given parliamentary period
Description
A function for retrieving Norwegian MPs for a given parliamentary period from the parliament API
Usage
get_parlperiod_mps(periodid = NA, substitute = FALSE, good_manners = 0)
Arguments
periodid |
Character string indicating the id of the parliamentary period to retrieve. |
substitute |
Logical. Whether or not to include substitute MPs. |
good_manners |
Integer. Seconds delay between calls when making multiple calls to the same function |
Value
A data.frame with the following variables:
response_date | Date of data retrieval |
version | Data version from the API |
death | Date of death |
lastname | MP last name |
birth | Date of birth |
firstname | MP first name |
mp_id | MP id |
gender | MP gender |
county_id | Id of county MP represented |
party_id | Id of party MP represented |
substitute_mp | Logical for whether MP is a substitute |
period_id | Id of period represented in |
See Also
get_mp_bio get_mp get_mp_pic get_session_mp_speech_activity
Examples
## Not run:
# Request one MP by id
get_parlperiod_mps("2005-2009")
# Request MPs from several periods by id
ids <- c("1961-65", "1997-01", "2009-2013")
mps <- lapply(ids, get_parlperiod_mps, good_manners = 2)
mps <- do.call(rbind, mps)
## End(Not run)
[Package stortingscrape version 0.3.0 Index]