Learn R Programming

hansard (version 0.5.0)

constituencies: Imports data on House of Commons constituencies, returning a tibble of all current and former Westminster constituencies.

Description

Imports data on House of Commons constituencies, returning a tibble of all current and former Westminster constituencies.

Usage

constituencies(current = TRUE, extra_args = NULL, tidy = TRUE,
  tidy_style = "snake_case")

hansard_constituencies(current = TRUE, extra_args = NULL, tidy = TRUE, tidy_style = "snake_case")

Arguments

current

If TRUE, returns only current constituencies. If FALSE, returns all current and former constituencies. Due to the structure of the API, this function has to request all available data, and then subset that data. Defaults to TRUE.

extra_args

Additional parameters to pass to API. Defaults to NULL.

tidy

Fix the variable names in the tibble to remove special characters and superfluous text, and converts the variable names to a consistent style. Defaults to TRUE.

tidy_style

The style to convert variable names to, if tidy = TRUE. Accepts one of 'snake_case', 'camelCase' and 'period.case'. Defaults to 'snake_case'.

Value

A tibble with details of Westminster constituencies.

Examples

Run this code
# NOT RUN {
x <- constituencies()

x <- constituencies(current = FALSE)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab