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, or a vector of strings, indicating the id of the question to retrieve

good_manners

Numeric. Seconds delay between calls when making multiple calls to the same function. Note that the Stortinget API is limited to 100 calls per minute (see https://data.stortinget.no/nyhetsoversikt/begrensning-pa-api-kall/).

Value

A data.frame with the following variables:

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 the question was answered
answ_on_behalf_ofId of minister answered on behalf of, when relevant
answ_on_behalf_of_minister_idId of department answered on behalf of, when relevant
answ_on_behalf_of_minister_titleTitle of department answered on behalf of, when relevant
agenda_numberAgenda number in meeting
moved_toDate moved to
idQuestion id
legacy_idQuestion legacy id (only use to match with data downloaded before 10.12.2024)
correct_person_idNot documented in API
correct_person_minister_idNot documented in API
correct_person_minister_titleNot documented in API
sent_dateDate question was sent
session_idSession id
question_textFull question text
response_dateDate of data retrieval
versionData version from the API
question_from_idId of MP asking the question
question_from_county_idId of the county of the MP asking the question
question_from_party_idId of the party of the MP asking the question
question_from_deputyWhether the MP asking the question is a substitute
question_numberQuestion number
question_to_idId of minister the question was asked to
question_to_minister_idDepartment id of minister the question was asked to
question_to_minister_titleDepartment title of minister the question was asked to
statusStatus of the question
answer_textAnswer text (often empty)
titleQuestion title
typeQuestion type
asked_by_other_idID of person that asked the question on behalf of question_from_id

Examples


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

## Retrieve all interpellations for a particular session
qsesh <- get_session_questions("2012-2013", q_type = "interpellasjoner")

## Retrieve detailed information on all interpellations in that session
int1213 <- get_question(qsesh$id, good_manners = 2)
} # }