Learn R Programming

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

mnis (version 0.2.7)

Easy Downloading Capabilities for the Members' Name Information Service

Description

An API package for the Members' Name Information Service operated by the UK parliament. Documentation for the API itself can be found here: .

Copy Link

Version

Install

install.packages('mnis')

Monthly Downloads

47

Version

0.2.7

License

MIT + file LICENSE

Maintainer

Evan Odell evanodell91@gmail.com

Last Published

July 3rd, 2017

Functions in mnis (0.2.7)

mnis_base

mnis_bom

Strip out BOM from JSON data
constituency_results_tidy

constituency_results_tidy
date_tidy

A function that makes date variables returned from the API datable, ie by converting them to POSIXct. Does the same thing for datetimes.
mnis_eligible

Returns all members who are able to sit in either house, or who are currently ineligible to sit. Members ineligible to sit include but are not necessarily limited to former MPs, members of the judiciary, who are recused from House of Lords duties.
mnis_extra

mnis_joined_between

Function returns all members who took their seats in the house between two given dates.
mnis_lords_type

Calls the API to return a tibble with details on the number of Lords and their affiliations.
tidy_bom

A function to strip Byte Order Marks (BOM) out of JSON data returned from the API.
mnis

mnis: Easy Downloading Capabilities for the Member Name Information Service
mnis_additional

A series of basic function for the API lookup. Each function accepts a member's ID and returns information; if no ID is given basic information on all members of both houses is returned.
mnis_member_date

Returns a tibble with a member's status on a given date.
mnis_mps_on_date

A tibble with information on all MPs who were members of the House of Commons on the date specificed (if only date1 is included as a parameter), or on or between the two dates if both date1 and date2 are specified.
mnis_all_members

Returns a tibble with information on al members of both houses or a given house.
mnis_all_reference

Returns a list of 39 tibbles, with the name and data returned from each respective reference function.
mnis_full_biog

Requests all available biographical information for a given member, and returns it in the form of a tibble.
mnis_general_election_results

Returns an object containing list with details of the search parameter and a tibble with election results. Accepts queries on location type and name, and the start and end date to return general elections between. The API does not contain data for Norther Ireland.
mnis_reference

A series of 39 functions that return tibbles of reference data. This data is useful for providing parameters for other function calls. The functions do not accept any arguments aside from the 'tidy' argument, which defaults to TRUE.
mnis_tidy

Functions to tidy up the variable names returned from the API, and turn dates and datetimes to POSIXct.
mnis_constituency_results

mnis_department

mnis_party_state

A tibble with information on the numbers and gender of MPs, by party, for the given date.
mnis_peers_on_date

A tibble with information on all peers who were members of the House of Commons on the date specificed (if only date1 is included as a parameter), or on or between the two dates if both date1 and date2 are specified.