| get_mp {stortingscrape} | R Documentation |
Extract information on specific MPs
Description
A function for retrieving information on Norwegian MPs from the parliament API
Usage
get_mp(mpid = NA, good_manners = 0)
Arguments
mpid |
Character string indicating the id of the MP to retrieve. |
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 | MP date of death, if applicable |
| last_name | MP last name |
| birth | MP date of birth |
| first_name | MP first name |
| id | MP id |
| gender | MP gender |
See Also
get_mp_bio get_parlperiod_mps get_mp_pic get_session_mp_speech_activity
Examples
## Not run:
# Request one MP by id
get_mp("AAMH")
# Request several MPs by id
ids <- c("AAMH", "AMSK", "MAAA")
mps <- lapply(ids, get_mp, good_manners = 2)
mps <- do.call(rbind, mps)
## End(Not run)
[Package stortingscrape version 0.3.0 Index]