Learn R Programming

hansard (version 0.4.0)

elections: elections

Description

Imports data on elections

Usage

elections(ID = NULL, extra_args = NULL, tidy = TRUE)

Arguments

ID

Accepts an ID for a general or by-election from the 2010 general election onwards, and returns the date and type of the elction. If NULL, returns the date and type of all available elections. Defaults to NULL.

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 <- elections(517994)

Run the code above in your browser using DataLab