Learn R Programming

hansard (version 0.3.4)

commons_divisions: commons_divisions

Description

Imports data on House of Commons divisions

Usage

commons_divisions(comsDivType = c("all", "date", "aye", "no", "voteSummary", "voteFull", "session", "uinSummary", "uinFull"))

Arguments

comsDivType
The type of data you want, allows the arguments 'all', 'date', 'aye', 'no', 'voteSummary', 'voteFull', 'uinSummary', 'uinFull' and 'session'. Defaults to 'all'.
all
Returns a data frame with all available divisions.
date
Requests a date in yyyy-mm-dd format and returns a data frame with all available divisions on that date.
aye
Returns a data frame with all divisions where a given MP voted aye.
no
Returns a data frame with all divisions where a given MP voted no.
voteSummary
Requests a division ID, and returns a summary of results of that division in a data frame.
voteFull
Requests a division ID, and returns a data frame with details on how each individual member voted.
uinSummary
Requests a division UIN and returns a data frame with a summary of results of that division.
uinFull
Requests a division UIN and returns a data frame with the full results of that division.
session
Requests a session in yyyy/yy format (e.g. 2016/17) and returns a data frame with all divisions in that session.

Examples

Run this code
## Not run: 
# x <- commons_divisions('all')
# 
# x <- commons_divisions('date')
# 
# x <- commons_divisions('no')
# 
# x <- commons_divisions('aye')
# 
# x <- commons_divisions('voteSummary')
# 
# x <- commons_divisions('voteFull')
# 
# x <- commons_divisions('session')
# 
# x <- commons_divisions('uinSummary')
# 
# x <- commons_divisions('uinFull')
# ## End(Not run)

Run the code above in your browser using DataLab