Learn R Programming

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

hansard: Accessing Westminster Parliament Data

An R package to automatically fetch data from the UK Parliament API. Ironically, Hansard data is not yet accessible through the API. To explore all available data see http://www.data.parliament.uk/. Help on the API itself is here.

Like the UK parliament API, this package is a work in progress. Additional functionalities will be added to the package as they are developed in the API. The most up-to-date documentation for this package will always be available at http://ropengov.github.io/hansard and at https://docs.evanodell.com/hansard/.

To install from CRAN run:

install.packages("hansard")

Or, if using the pacman package:

pacman::p_load(hansard)

To install the development version run:

#install.packages("devtools")
devtools::install_github("evanodell/hansard")

or

pacman::p_load_current_gh("evanodell/hansard")

Using hansard

For an introduction to hansard, please see the vignette. If you are unfamiliar with web APIs this introductory course is useful.

API calls with console input

Previous versions (<=0.3.4) of hansard included options for console-based inputs to call data and interact with the API. This feature has been removed from subsequent versions, and is available in the https://github.com/evanodell/hansard-console package. There are no plans to submit this to CRAN, and it is not being actively maintained.

Disclaimer

This package is in no way officially related to or endorsed by the UK Parliamentary Data Service. It is released under an MIT license.

Acknowledgements

This package is part of rOpenGov. Evan Odell is the creator and maintainer.

Copy Link

Version

Install

install.packages('hansard')

Monthly Downloads

30

Version

0.6.0

License

MIT + file LICENSE

Maintainer

Evan Odell evanodell91@gmail.com

Last Published

March 3rd, 2018

Functions in hansard (0.6.0)

lords_attendance_session

House of Lords attendance by session
election_candidates

Election candidate details
lords_divisions

House of Lords divisions
lords_written_questions

House of Lords written questions
lords_ammendments

Defunct parameters for hansard package
lords_amendments

House of Lords Amendments.
mp_edms

Early Day Motions by MP or Peer
members_search

Search for an MP or Peer by name and constituency
lords_interests

Peers' registered interests
mp_vote_record

Individual MP voting records
lords_attendance

mp_questions

Questions asked by a given MP or MPs
lords_sessions

Lords sessions
lords_attendance_date

House of Lords attendance by date
papers_laid

Papers laid
publication_logs

House publications
research_briefings

Parliamentary Research Briefings
hansard_generic

Hansard - Generic API Function
election_results

General and By-Election Results
lord_vote_record

Voting record of members of the House of Lords
research_topics_list

Lists of research briefing topics, subtopics and types.
sessions_info

Parliamentary Session data
members

Members of both houses
tv_programmes

TV broadcast data
commons_divisions

House of Commons divisions
bill_stage_types

Bill Stage Types
commons_oral_questions

House of Commons Oral Questions
bills

Bill data
bill_publications

Bill Publications
commons_answered_questions

House of Commons answered questions
commons_oral_question_times

Commons oral question times
commons_division_date

House of Commons Division Dates
bill_publication_types

all_answered_questions

All answered parliamentary questions
commons_terms

Parliamentary Thesaurus
epetition

Individual epetitions
commons_written_questions

House of Commons Written Questions
early_day_motions

Early day motion data
hansard

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

Bulk Epetition data
constituencies

House of Commons constituencies
elections

General and By-Elections