Skip to contents

A function for retrieving single parliamentary questions by id. For retrieving the whole debate over a question, the get_publication function has to be used

Usage

get_question(questionid = NA, good_manners = 0)

Arguments

questionid

Character string indicating the id of the session to request interpellations from

good_manners

Integer. Seconds delay between calls when making multiple calls to the same function

Value

A data.frame with the following variables:

response_dateDate of data retrieval
versionData version from the API
justificationJustification for question
answ_by_idId for answering minister
answ_by_minister_idId for department of answering minister
answ_by_minister_titleTitle for department of answering minister
answ_dateDate question was asked
answ_on_belhalf_ofId of minister answered on behalf of, when relevant
answ_on_belhalf_of_minister_idId of department answered on behalf of, when relevant
answ_on_belhalf_of_minister_titleTitle of department answered on behalf of, when relevant
agenda_numberAgenda number in meeting
moved_toDate moved to
idQuestion id
correct_person_idNot documented in API
correct_person_minister_idNot documented in API
correct_person_minister_titleNot documented in API
sendt_dateDate question was sent
session_idSession id
question_textFull question text
question_from_idId of MP asking the question
qustion_numberQuestion number
qustion_to_idId of minister the question was asked to
qustion_to_minister_idDepartment id of minister the question was asked to
qustion_to_minister_titleDepartment title of minister the question was asked to
answer_textAnswer text (often empty)
titleQuestion title
typeQuestion type

Examples


if (FALSE) {
# An example of a possible workflow

## Retreive sessions
sessions <- get_parlsessions()

## Retreive all interpellations for a particular session
qsesh <- get_session_questions(sessions$id[9], q_type = "interpellasjoner")

## Retreve detailed information on all interpellations in that session
library(pbmcapply) # for progress bar. never use paralell on scraping
int1213 <- pbmclapply(qsesh$id, function(x){
    get_question(x, good_manners = 2)
}, mc.cores = 1)

quest1213 <- do.call(rbind, int1213)
}