get_political {legislatoR}R Documentation

Fetch 'Political' table

Description

Fetches political data of legislators for the specified legislature. Requires a working Internet connection.

Usage

get_political(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 in long format with columns (varies by legislature):

Value

A data frame with columns as specified above.

Source

Wikipedia, https://www.wikipedia.org/
Czech Republic Parliamentary Members Archive https://public.psp.cz/sqw/fsnem.sqw?zvo=1
Spain Parliamentary Members Archive https://www.congreso.es/es/busqueda-de-diputados

Examples

# Get entire 'Political' table for the Czech Poslanecka Snemovna
cze_political <- get_political(legislature = "cze")
tibble::glimpse(cze_political)

# Get 'Political' table for female DSP party members of the Czech Poslanecka Snemovna
cze_political_subset <- dplyr::semi_join(x = dplyr::filter(cze_political,
                                                           party == "ODS"),
                                         y = dplyr::filter(get_core(legislature = "cze"),
                                                           sex == "female"),
                                         by = "pageid")
tibble::glimpse(cze_political_subset)


[Package legislatoR version 1.1.0 Index]