get_core {legislatoR}R Documentation

Fetch 'Core' table

Description

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

Usage

get_core(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 (varies by legislature):

Value

A data frame with columns as specified above.

Source

Wikipedia, https://www.wikipedia.org/
Wikipedia API, https://en.wikipedia.org/w/api.php
Wikidata API, https://www.wikidata.org/wiki/Wikidata:Main_Page
Wikimedia Commons, https://commons.wikimedia.org/wiki/Main_Page
Face++ Cognitive Services API, https://www.faceplusplus.com/
Germany Bundestag Open Data, https://www.bundestag.de/services/opendata

Examples

# Get entire 'Core' table for the German Bundestag
deu_core <- get_core(legislature = "deu")
tibble::glimpse(deu_core)

# Get 'Core' table for 16th session of the German Bundestag
deu_core_subset <- dplyr::semi_join(x = deu_core,
                                    y = dplyr::filter(get_political(legislature = "deu"),
                                                      session == 16),
                                    by = "pageid")
tibble::glimpse(deu_core_subset)


[Package legislatoR version 1.1.0 Index]