Skip to contents

A function for retrieving all cases treated in a specified parliamentary session.

Usage

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

Arguments

sessionid

Character string indicating the id of the parliamentary session to retrieve.

good_manners

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

cores

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

Value

A data.frame with the following variables:

  1. $root (main data on the MP)

    response_dateDate of data retrieval
    versionData version from the API
    treated_session_idSession the case was treated in
    document_groupDocument group the case belongs to
    referenceDocument reference
    idCase id
    com_req_idCommittee recommendation id
    com_req_codeCommittee recommendation code
    title_shortShort title of case
    case_filed_idId of filed case
    last_update_dateDate of last update on case
    statusStatus of the case
    titleFull title of the case
    typeType of case
    session_idSession id of the case
    committee_idResponsible committee id
  2. $topics (named list by case id)

    is_main_topicLogical indication whether the topic is the main topic
    main_topic_idId of the main topic for the case
    idTopic id
    nameTopic name
  3. $proposers (named list by case id)

    rep_idProposing MP id
    county_idCounty id of proposing MP
    party_idParty id of proposing MP
    rep_subLogical indicator for whether MP is a substitute
  4. $spokespersons (data frame by case id)

    case_idCase id
    rep_idSpokesperson(s) MP id for the case
    county_idCounty id of spokesperson MP
    party_idParty id of spokesperson MP
    rep_subLogical indicator for whether MP is a substitute

See also

Examples


if (FALSE) {
s0506 <- get_session_cases("2005-2006")
head(s0506)
}