mnis_constituency_results: Returns a single object containing a list with details of the...

Description Usage Arguments Value See Also Examples

View source: R/mnis_constituency_results.R

Description

Returns a single object containing a list with details of the constituency and a tibble with election results. For constituency IDs, see ref_constituencies.

Usage

1
2
mnis_constituency_results(constituency_id = NULL, election_id = 0,
  tidy = TRUE, tidy_style = "snake_case")

Arguments

constituency_id

The ID of the constituency to return the data for. This parameter cannot be empty.

election_id

The ID of the election to return the data for. Defaults to 0, which calls the most recent result, either the result of the last general election, or the result of the last byelection held since that election.

tidy

If TRUE, fixes the variable names in the tibble to remove non-alphanumeric characters and superfluous text, and convert 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 list with details of the constituency, labelled 'details' and a tibble with election results, labelled 'results'. The list and tibble are stored in a single object.

See Also

mnis_reference

Examples

1
2
3
4
5
6
## Not run: 

x <- mnis_constituency_results(constituency_id = 3709, election_id = 0)


## End(Not run)

mnis documentation built on May 2, 2019, 11:02 a.m.