get_social {legislatoR}R Documentation

Fetch 'Social' table

Description

Fetches social media handles and website URLs of legislators for the specified legislature. Requires a working Internet connection.

Usage

get_social(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

Wikidata API, https://www.wikidata.org/wiki/Wikidata:Main_Page

Examples

# Get entire 'Social' table forthe UK House of Commons
gbr_social <- get_social(legislature = "gbr")
tibble::glimpse(gbr_social)

# Get 'Social' table for members of the UK House of Commons with available TheyWorkForYou ID
gbr_social_subset <- dplyr::semi_join(x = gbr_social,
                                      y = dplyr::filter(get_ids(legislature = "gbr"),
                                                        !is.na(theyworkforyou)),
                                      by = "wikidataid")
tibble::glimpse(gbr_social_subset)


[Package legislatoR version 1.1.0 Index]