Learn R Programming

hansard (version 0.4.0)

constituencies: constituencies

Description

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

Usage

constituencies(current = TRUE, extra_args = NULL, tidy = TRUE)

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.

extra_args

Additional parameters to pass to API. Defaults to NULL.

tidy

Fix the variable names in the data frame to remove extra characters, superfluous text and convert variable names to snake_case. Defaults to TRUE.

Examples

Run this code


x <- constituencies()

x <- constituencies(current = FALSE)



Run the code above in your browser using DataLab