Description Usage Arguments Value See Also Examples
Imports data on general and by-elections from the 2010 General Election onwards.
If both ID
and type
are used to query the API,
ID
takes precedence and type
is ignored.
1 2 3 4 5 6 7 | elections(ID = NULL, type = NULL, start_date = "1900-01-01",
end_date = Sys.Date(), label = NULL, extra_args = NULL,
tidy = TRUE, tidy_style = "snake", verbose = TRUE)
hansard_elections(ID = NULL, type = NULL, start_date = "1900-01-01",
end_date = Sys.Date(), label = NULL, extra_args = NULL,
tidy = TRUE, tidy_style = "snake", verbose = TRUE)
|
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 |
type |
Accepts |
start_date |
Only includes elections held on or after this date.
Accepts character values in |
end_date |
Only includes elections held on or before this date.
Accepts character values in |
label |
Label of the election. By-elections are in
|
extra_args |
Additional parameters and queries to pass to API. These
queries must be strings and start with "&". See the
API documentation
or the package vignette for more details. Defaults to |
tidy |
Logical parameter. If |
tidy_style |
The style to convert variable names to, if
|
verbose |
If |
A tibble with details on all elections from the 2010 General Election onwards, subject to function parameters. Includes the election ID, the date, and the type of election(s).
1 2 3 4 | ## Not run:
x <- elections(517994)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.