get_history {legislatoR}R Documentation

Fetch Wikipedia 'History' table

Description

Fetches full revision histories of legislators' Wikipedia biographies for the specified legislature. Requires a working Internet connection.

Usage

get_history(legislature)

Arguments

legislature

A character string specifying the three-letter country code of the legislature for which data shall be fetched. Currently one of ‘aut’, ‘can’, ‘cze’, ‘esp’, ‘fra’, ‘deu’, ‘irl’, ‘sco’, ‘gbr’, ‘usa_house’, or ‘usa_senate’.

Format

Data frame with columns:

Value

A data frame with columns as specified above.

Source

Wikipedia API, https://en.wikipedia.org/w/api.php

Examples

# Get entire 'History' table for the Austrian Nationalrat
aut_history <- get_history(legislature = "aut")
tibble::glimpse(aut_history)

# Get 'History' table for NEOS party members of the Austrian Nationalrat
aut_history_subset <- dplyr::semi_join(x = aut_history,
                                       y = dplyr::filter(get_political(legislature = "aut"),
                                                         party == "NEOS"),
                                       by = "pageid")
tibble::glimpse(aut_history_subset)


[Package legislatoR version 1.1.0 Index]