Learn R Programming

⚠️There's a newer version (0.8.0) of this package.Take me there.

hansard (version 0.5.0)

Provides Easy Downloading Capabilities for the UK Parliament API

Description

Provides functions to download data from the APIs. Because of the structure of the API, there is a named function for each type of available data for ease of use, as well as some functions designed to retrieve specific pieces of commonly used data. Functions for each new API will be added as and when they become available.

Copy Link

Version

Install

install.packages('hansard')

Monthly Downloads

30

Version

0.5.0

License

MIT + file LICENSE

Maintainer

Evan Odell evanodell91@gmail.com

Last Published

July 10th, 2017

Functions in hansard (0.5.0)

commons_oral_question_times

Imports data on House of Commons oral question times
commons_oral_questions

Imports data on House of Commons oral questions
commons_terms

Imports the parliamentary thesaurus. The API is rate limited to 5500 requests at a time, so some use of parameters is required.
commons_written_questions

Imports data in a tibble on House of Commons written questions.
hansard_generic

Hansard - Generic API Function
hansard_tidy

A function to make the results of calls to the API easier to work with.
commons_division_date

Returns a tibble with the dates of House of Commons divisions.
commons_divisions

Imports data on House of Commons divisions.
election_candidates

Returns the name of all candidates standing in an election.
election_results

Imports data on general election and by-election results from the 2010 general election onwards.
lords_divisions

Imports data on House of Lords divisions
lords_interests

Registered interests of members of the House of Lords
papers_laid

Imports data on papers laid before the House.
publication_logs

Imports data on House of Commons and House of Lords publications.
constituencies

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

Imports data on early day motions, including the content, signatories, and sponsors of early day motions.
lord_vote_record

Accepts an ID number for a member of the House of Commons, and returns a tibble of their votes.
lords_amendments

Imports data on House of Lords Amendments. Returns a tibble with all available House of Lords amendments.
all_answered_questions

Imports data on all answered parliamentary questions.
bill_stage_types

bill_stage_types
elections

Imports data on general and by-elections from the 2010 General Election onwards.
epetition

Imports data on a given epetition.
research_briefings

Imports data on Parliamentary Research Briefings.
research_topics_list

Functions to retrieve lists of research briefing topics, subtopics and types.
bills

Imports data on House of Commons and House of Lords bills
commons_answered_questions

Imports data on House of Commons answered questions.
epetition_tibble

Get data on epetitions submitted to parliament, with the label, sponsor, number of signatures, date created and epetition ID.
hansard

hansard: Provides Easy Downloading Capabilities for the UK Parliament API
lords_written_questions

Imports data on House of Lords written questions
members_search

Search for an MP or Lord by name and constituency
mp_edms

Imports data on early day motions in signed, sponsored or primarily sponsored by a given MP.
sessions_info

Imports data on Parliamentary Sessions. Note that due to the date format used by the API, if days==TRUE and the end_date and start_date parameters are not set to the default values, the function downloads all available data and then subsets the tibble between the two given dates.
tv_programmes

Imports data on TV broadcasts.
members

Imports data on all current and former Members of Parliament including the Lords and the Commons
lords_ammendments

Defunct parameters for hansard package
mp_questions

Accepts an ID number for a member of the House of Commons, and returns a tibble of of all their oral and written questions.
mp_vote_record

Accepts an ID number for a member of the House of Commons, and returns a tibble of their votes.
lords_attendance

Imports data on House of Lords attendance.