Skip to contents

A function for retrieving all questions within a parliamentary session.

Usage

get_session_questions(sessionid = NA, q_type = NA, status = NA, good_manners = 0)

Arguments

sessionid

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

q_type

Character string indicating type of question to retrieve. Options are "interpellasjoner" (interpellations), "sporretimesporsmal" (oral questions), or "skriftligesporsmal" (written questions).

status

Character string question status extraction. Possible values are NA (extract all questions), "til_behandling" (pending questions), "trukket" (withdrawn questions), "bortfalt" (lapsed questions), or "alle" (all questions)

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
answ_by_idId of minister answering question
answ_by_minister_idDepartment id of answering minister
answ_by_minister_titleDepartment title of answering minister
answ_dateDate answer was given
answ_on_belhalf_ofAnswer given on behalf of
answ_on_belhalf_of_minister_idDepartment id of minister given answer on behalf of
answ_on_belhalf_of_minister_titleDepartment title of minister given answer on behalf of
topic_idsId of relevant topics for question
moved_toQuestion moved to
asked_by_other_idMP id, if question was not asked by the questioning MP
idQuestion id
correct_personNot documented in API
correct_person_minister_idNot documented in API
correct_person_minister_titleNot documented in API
sendt_dateDate the question was sent
session_idSession id
question_from_idQuestion from MP id
question_numberQuestion number within session
question_to_idQuestion directed to minister id
question_to_minister_idQuestion directed to minister department id
question_to_minister_titleQuestion directed to minister department title
statusQuestion status
titleQuestion title
typeQuestion type

Examples


if (FALSE) { # \dontrun{
interp <- get_session_questions(sessionid = "2013-2014", 
                                q_type = "interpellasjoner", 
                                status = "trukket")
interp
} # }