Skip to contents

A function for retrieving all hearings in a specified parliamentary session.

Usage

get_session_hearings(sessionid = NA, good_manners = 0, cores = 1)

Arguments

sessionid

Character string, or a vector of strings, indicating the id of the parliamentary session to retrieve. With several ids, the result is a named list of the results below, keyed by session id.

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/).

cores

Integer. Number of cores (1 by default) to use in structuring the data. More than 1 will not work on Windows.

Value

A list with four elements:

  1. $root (hearing meta data)

    response_dateDate of data retrieval
    versionData version from the API
    session_idSession id
  2. $hearing (main data on the hearing)

    deadline_dateDeadline date for hearing
    statusStatus of the hearing
    hearing_idHearing id
    input_deadlineDeadline date for input
    writtenLogical indication of whether the input was written
    application_deadlineDeadline date for application to hearing
    start_dateStart date for hearing
    status_pubPublication status for hearing
    status_info_textStatus information text
    typeType of hearing
    committee_idCommittee id for committee responsible for hearing
  3. $hearing_case_info (the case(s) belonging to each hearing, by hearing id)

    hearing_idHearing id
    case_referenceText reference for case
    case_idCase id
    case_short_titleShort title for case
    case_publicationURL for front end web-page publication
    case_titleFull title for case
  4. $hearing_date (the date(s) and place(s) each hearing was held, by hearing id)

    hearing_idHearing id
    dateDate of hearing
    placeWhere the hearing was held

Examples


if (FALSE) { # \dontrun{

hear <- get_session_hearings("2010-2011")
head(hear$hearing)

} # }