constituencies: Imports data on House of Commons constituencies, returning a...

Description Usage Arguments Value Examples

View source: R/constituencies.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
8
## Not run: 

x <- constituencies()

x <- constituencies(current = FALSE)


## End(Not run)

hansard documentation built on June 5, 2017, 9:01 a.m.

Search within the hansard package
Search all R packages, documentation and source code