| get_mp | R Documentation |
A function for retrieving information on Norwegian MPs from the parliament API
get_mp(mpid = NA, good_manners = 0)
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 |
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 |
get_mp_bio get_parlperiod_mps get_mp_pic get_session_mp_speech_activity
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.