constituencies: House of Commons constituencies

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/or former Westminster constituencies, subject to parameters.

Usage

1
2
3
4
5
constituencies(current = NULL, extra_args = NULL, tidy = TRUE,
  tidy_style = "snake_case", verbose = FALSE)

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

Arguments

current

If TRUE, returns only current constituencies. If FALSE, returns only former constituencies. If NULL, returns all current and former constituencies. Defaults to NULL.

extra_args

Additional parameters to pass to API. See the API documentation or the package vignette for more details. Defaults to NULL.

tidy

Logical parameter. If TRUE, fixes 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'.

verbose

If TRUE, returns data to console on the progress of the API request. Defaults to FALSE.

Value

A tibble with details of Westminster constituencies.

Examples

1
2
3
4
5
6
## Not run: 
x <- constituencies()

y <- constituencies(current = FALSE)

## End(Not run)

hansard documentation built on Oct. 10, 2017, 1:08 a.m.