Skip to contents

A function for retrieving biography of Norwegian MPs from the parliament API

Usage

get_mp_bio(mpid = NA, good_manners = 0)

Arguments

mpid

Character string indicating the id of the MP to retrieve.

good_manners

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

Value

A list with ten data frames:

  1. $root (main data on the MP)

    response_dateDate of data retrieval
    versionData version from the API
    idId of the MP
  2. $literature (all literature the MP contributed to)

    yearYear of entry publication
    descriptionDescription of the publication
    last_nameMP's last name
    more_yearsNot described in the API
    publisherPublisher
    first_nameFirst name of the MP
    placePlace of publication
    titleTitle of the publication
    typeMP's role in publication (author etc)
  3. $leave_of_absence (times the MP was on leave)

    from_dateStart date of leave
    reasonReason for leave
    to_dateEnd of leave
    typeType of leave
    sub_last_nameSubstitute MP last name (id not recorded)
    sub_first_nameSubstitute MP first name
  4. $personalia (the MP's personalia)

    seniority_aarNumber of years in parliament
    seniority_dagerNumber of extra days (addition to years)
    county_of_birthBirth county of the MP
    municipality_of_birthBirth municipality of the MP
    eulogy_dateEulogy date of the MP, when applicable
  5. $father (the MP's father personalia)

    death_yearFather's year of death
    last_nameFather's last name
    birth_yearFather's year of birth
    first_nameFather's first name
    professionFather's profession
  6. $mother (the MP's mother personalia)

    death_yearMother's year of death
    last_nameMother's last name
    birth_yearMother's year of birth
    first_nameMother's first name
    professionMother's profession
  7. $parl_periods (parliamentary periods the MP has held a seat)

    from_dateDate MP held seat from
    countyCounty the MP represented
    party_idParty id for the MP's party
    rep_numberRepresentative number (within the whol parliament)
    parl_period_idId of the parliamentary period
    to_dateDate MP held a seat to
    typeType of representation
  8. $parl_positions (parliamentary positions held by the MP)

    from_yearYear MP held position from
    from_dateDate MP held position from
    committee_idId of the position (in committee, cabinet, delegation, etc)
    committee_namePosition name
    committee_typePosition type
    sortingNot described in the API
    parl_period_idParliamentary period the position was held (cabinet data missing)
    to_yearYear MP held position to
    to_dateDate MP held position to
  9. $vocation (vocation and education of the MP outside of parliament)

    several_periods_textText description if the vocation was held for several periods
    from_yearYear MP held vocation from
    from_year_unknownLogical indication for whether the start year is unknown
    noteNote for vocation
    nameName of vocation
    to_yearYear MP held vocation to
    to_year_unknownLogical indication for whether the end year is unknown
    typeVocation type (10 = education, 20 = work)
  10. $other_positions (other positions held outside parliament)

    several_periods_textText description if the vocation was held for several periods (removed from API)
    from_yearYear MP held vocation from
    from_year_sortingNot described in API (removed from API)
    from_year_unknownLogical indication for whether the start year is unknown
    max_to_yearThe last possible time the MP held the position (removed from API)
    noteNote for position
    min_to_yearThe earliest possible time the MP held the position (removed from API)
    levelNot described in API
    organizationOrganization holding the position
    placePlace of the position
    to_yearYear MP held position to
    to_year_unknownLogical indication for whether the end year is unknown
    typePosition type
    positionPosition name/description

Examples

if (FALSE) {

# Request one MP by id
get_mp_bio("AAMH")

}