Title: | 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: <http://data.parliament.uk/membersdataplatform/default.aspx>. |
Authors: | Evan Odell [aut, cre] |
Maintainer: | Evan Odell <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.1 |
Built: | 2025-03-07 03:19:12 UTC |
Source: | https://github.com/evanodell/mnis |
constituency_results_tidy
constituency_results_tidy(results, details)
constituency_results_tidy(results, details)
results |
The tibble to tidy |
details |
The list to tidy |
A function that makes date variables returned from the API datable, ie by converting them to POSIXct. Does the same thing for datetimes.
date_tidy(df)
date_tidy(df)
df |
The tibble with the undateable dates. |
An API package for the Members' Name Information Service operated by the UK parliament. The package is intended to simplify pulling data from an API for users unfamiliar with APIs. Documentation for the API itself can be found here: http://data.parliament.uk/membersdataplatform/default.aspx.
The package includes a built in function to remove a byte-order mark from
the API data, and a parameter tidy
with each function that converts
variable names into an R friendly style, removing non-alphanumeric
characters and converting to snake_case when equal to TRUE
,
its default value.
All functions requests data in JSON format and parse it to a tibble. The
exception is mnis_constituency_results()
which returns a
single object containing a list (with constituency details) and a
tibble (with election results).
None of the functions included in this package appear to run into the API rate limit, although there may be restrictions to custom requests, which allow a maximum of three parameters.
Returns a tibble with information on all members of both houses or a given house.
mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" )
mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" )
house |
The house to which the member belongs. Accepts one of
|
party |
The party to which a member belongs. If |
tidy |
Fix the variable names in the tibble to remove special
characters and superfluous text, and converts the variable names to a
consistent style. Defaults to |
tidy_style |
The style to convert variable names to, if
|
A tibble with information on all members of the House of Commons and/or the House of Lords that meet the criteria included in the function parameters.
## Not run: x <- mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" ) ## End(Not run) ## Not run: x <- mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" ) ## End(Not run)
## Not run: x <- mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" ) ## End(Not run) ## Not run: x <- mnis_all_members( house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" ) ## End(Not run)
Returns a list of 39 tibbles, with the name and data returned from each respective reference function.
mnis_all_reference(tidy = TRUE, tidy_style = "snake_case")
mnis_all_reference(tidy = TRUE, tidy_style = "snake_case")
tidy |
Fix the variable names in each tibble to remove special
characters and superfluous text, and convert all the variable names to
snake_case. Defaults to |
tidy_style |
The style to convert variable names to, if
|
Returns a list of 39 tibbles, with the name and data returned from each respective reference function.
## Not run: z <- mnis_all_reference() ## End(Not run)
## Not run: z <- mnis_all_reference() ## End(Not run)
The function requests data in JSON format, but the type of object,
and all URLs, paths and parameters are user-defined. mnis_base
does not include the option to tidy variable names and data types.
mnis_base(request)
mnis_base(request)
request |
The request query being made to the MNIS URL. |
See the API documentation at http://data.parliament.uk/membersdataplatform/memberquery.aspx for details and limits on requests made to MNIS.
## Not run: x <- mnis_base("House=Commons|IsEligible=true/") ## End(Not run)
## Not run: x <- mnis_base("House=Commons|IsEligible=true/") ## End(Not run)
A series of basic function for the API lookup. Each of these functions accepts a member's ID and returns information; if no ID is given basic information on all members of both houses is returned. All functions return basic details about the member (name, date of birth, gender, constituency, party, IDs, current status, etc.), as well as any available additional information requested by the specific function.
mnis_basic_details( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_biography_entries( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_committees( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_addresses( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_constituencies( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_elections_contested( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_experiences( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_government_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_honours( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_house_memberships( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_statuses( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_staff(ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case") mnis_interests( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_known_as( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_maiden_speeches( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_opposition_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_other_parliaments( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_parliamentary_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_parties( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_preferred_names( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" )
mnis_basic_details( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_biography_entries( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_committees( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_addresses( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_constituencies( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_elections_contested( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_experiences( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_government_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_honours( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_house_memberships( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_statuses( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_staff(ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case") mnis_interests( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_known_as( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_maiden_speeches( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_opposition_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_other_parliaments( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_parliamentary_posts( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_parties( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" ) mnis_preferred_names( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" )
ID |
The member ID. If |
ref_dods |
If |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A list with the data corresponding to the particular function called.
mnis_additional
functionsmnis_basic_details
Basic biographical details
on a given Member
mnis_biography_entries
Member biographical information (e.g.
countries of interest, policy expertise etc...)
mnis_committees
Committees a Member sits or has sat on as
well details on committee chairing
mnis_addresses
Member address information (e.g. website,
twitter, constituency address etc...)
mnis_constituencies
Constituencies a Member has represented
mnis_elections_contested
Elections a Member has
contested but not won
mnis_experiences
Non-parliamentary experience of a Member
mnis_government_posts
Government posts a Member has held
mnis_honours
Honours (e.g. MBE, OBE etc...) held by a Member
mnis_house_memberships
House membership list of a Member
mnis_statuses
Status history (e.g. suspensions and
disqualifications) for a Member
mnis_staff
The staff employed by a Member
mnis_interests
Registered (financial) interests
of a Member
mnis_known_as
Details of names a Member has chosen to
be known as instead of their full title, only applicable to members
of the House of Lords
mnis_maiden_speeches
Maiden speech dates for a Member
mnis_opposition_posts
Opposition posts a Member has held
mnis_other_parliaments
Other Parliaments that a Member has held
a membership of (e.g. members of the Welsh Assembly)
mnis_parliamentary_posts
Parliamentary posts
a Member has held
mnis_parties
Party affiliations of a Member
mnis_preferred_names
Full set of data about a
Members' name (e.g. surname, forename, Honorary prefixes, full
details of House of Lords title and rank if applicable, etc...)
## Not run: x <- mnis_basic_details(172) ## End(Not run)
## Not run: x <- mnis_basic_details(172) ## End(Not run)
Strip out BOM from JSON data
mnis_bom(x)
mnis_bom(x)
x |
The GET return to strip BOM out of |
Returns a list with details of the constituency and a tibble with election results.
mnis_constituency_results( constituency_id = NULL, election_id = 0, tidy = TRUE, tidy_style = "snake_case" )
mnis_constituency_results( constituency_id = NULL, election_id = 0, tidy = TRUE, tidy_style = "snake_case" )
constituency_id |
The ID of the constituency to return the data for.
If |
election_id |
The ID of the election to return the data for. Defaults to 0, which returns the result of all elections held in that constituency. |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A list with details of the constituency, labelled 'details'
and a tibble with election results, labelled 'results'
. The list and
tibble are stored in a single object.
## Not run: x <- mnis_constituency_results(constituency_id = 3709, election_id = 0) ## End(Not run)
## Not run: x <- mnis_constituency_results(constituency_id = 3709, election_id = 0) ## End(Not run)
Request the holders of posts in specific departments by department ID.
mnis_department( department_id = 0, bench = "Government", former = TRUE, tidy = TRUE, tidy_style = "snake_case" )
mnis_department( department_id = 0, bench = "Government", former = TRUE, tidy = TRUE, tidy_style = "snake_case" )
department_id |
The department to look up. |
bench |
Flag to return either Government or Opposition information.
This parameter is case insensitive, so both |
former |
Logical parameter to include both current and
former ministers/shadow ministers. If |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A tibble with information on departments and ministers/shadow ministers.
## Not run: x <- mnis_department(department_id = 0, bench = "Government", former = TRUE) ## End(Not run)
## Not run: x <- mnis_department(department_id = 0, bench = "Government", former = TRUE) ## End(Not run)
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_eligible( eligible = TRUE, house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" )
mnis_eligible( eligible = TRUE, house = "all", party = NULL, tidy = TRUE, tidy_style = "snake_case" )
eligible |
If the member is currently eligible to sit. Accepts
|
house |
The house to which the member belongs. Accepts one of 'all', 'lords' and 'commons', defaults to 'all'. This parameter is not case sensitive, so 'commons', 'Commons' and 'cOmMOnS' will all return the same data. |
party |
The party to which a member belongs. Defaults to NULL. The
party must be fully spelled out (e.g. 'green party'), the API does not
accept searches on this parameter. For a tibble of parties,
see |
tidy |
Fix the variable names in the tibble to remove special
characters and superfluous text, and converts the variable names to a
consistent style. Defaults to |
tidy_style |
The style to convert variable names to, if |
## Not run: x <- mnis_eligible(eligible = FALSE, house = "all", party = "labour") y <- mnis_eligible(eligible = TRUE, house = "all", party = "green party") z <- mnis_eligible(house = "commons") ## End(Not run)
## Not run: x <- mnis_eligible(eligible = FALSE, house = "all", party = "labour") y <- mnis_eligible(eligible = TRUE, house = "all", party = "green party") z <- mnis_eligible(house = "commons") ## End(Not run)
Requests all available biographical information for a given member, and returns it in a list
mnis_full_biog( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" )
mnis_full_biog( ID = NULL, ref_dods = FALSE, tidy = TRUE, tidy_style = "snake_case" )
ID |
The ID number of the member, using the default MNIS scheme.
If |
ref_dods |
Request based on the Dods monitoring member ID scheme. Defaults to FALSE. If FALSE, requests using the default MNIS identification scheme. |
tidy |
Fix the variable names in the tibble to remove non-alphanumeric
characters and superfluous text, and convert variable names to a consistent
style. Defaults to |
tidy_style |
The style to convert variable names to, if |
## Not run: df172 <- mnis_full_biog(172) df500 <- mnis_full_biog(500) ## End(Not run)
## Not run: df172 <- mnis_full_biog(172) df500 <- mnis_full_biog(500) ## End(Not run)
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_general_election_results( location_type = "Country", location_name = "Great Britain", start_date = "1900-01-01", end_date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
mnis_general_election_results( location_type = "Country", location_name = "Great Britain", start_date = "1900-01-01", end_date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
location_type |
The type of area to return information for. Accepts
|
location_name |
The location to return data for. It can be the name of any Country, Region, County or Constituency. Defaults to 'Great Britain'. |
start_date |
Start date of search. Accepts character values in
|
end_date |
End date of search. Accepts character values in
|
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
Returns a list with details of the search parameter and a tibble with election results.
## Not run: x <- mnis_general_election_results( location_type = "Country", location_name = "England", start_date = "2010-01-01", end_date = "2016-01-01" ) ## End(Not run)
## Not run: x <- mnis_general_election_results( location_type = "Country", location_name = "England", start_date = "2010-01-01", end_date = "2016-01-01" ) ## End(Not run)
Function returns all members who took their seats in the house between two given dates.
mnis_joined_between( start_date = "1900-01-01", end_date = Sys.Date(), house = "all", party = NULL, eligible = "all", tidy = TRUE, tidy_style = "snake_case" )
mnis_joined_between( start_date = "1900-01-01", end_date = Sys.Date(), house = "all", party = NULL, eligible = "all", tidy = TRUE, tidy_style = "snake_case" )
start_date |
The start date of the search, Accepts character values in
|
end_date |
The end date of the search. Accepts character values in
|
house |
The house to which the member belongs. Accepts one of
|
party |
All members from a given party who joined between the two
dates. The party name must be fully spelled out (e.g. |
eligible |
If the member is currently eligible to sit. Accepts
one of |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A tibble with data on all members who joined between the two given dates.
## Not run: x <- mnis_joined_between( start_date = "2015-01-01", end_date = "2017-01-01", party = "labour" ) ## End(Not run)
## Not run: x <- mnis_joined_between( start_date = "2015-01-01", end_date = "2017-01-01", party = "labour" ) ## End(Not run)
Calls the API to return a tibble with details on the number of Lords and their party affiliations. Defaults to the current date, but can also return the number of Lords and their affiliations on a given date.
mnis_lords_type(date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case")
mnis_lords_type(date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case")
date |
Accepts character values in |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A tibble with information on the numbers of different types of Lords on a given date.
## Not run: x <- mnis_lords_type() ## End(Not run)
## Not run: x <- mnis_lords_type() ## End(Not run)
Returns a tibble with a member's status on a given date.
mnis_member_date( ID = NULL, date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
mnis_member_date( ID = NULL, date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
ID |
The ID of the member, or a vector with the IDs of multiple MPs.
If given multiple IDs, the results are combined into a single tibble.
Currently only accepts IDs from the default membership ID scheme. If
|
date |
Accepts character values in |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
Returns a tibble with the given member's status on the given date.
## Not run: x <- mnis_member_date(172) ## End(Not run)
## Not run: x <- mnis_member_date(172) ## End(Not run)
Requests data on all MPs who were members of the House of Commons on the
date specified, (if only date1
is included as a parameter), or
on or between the two dates if both date1
and date2
are
specified. Either date1
or date2
can be the latter of
the two dates.
mnis_mps_on_date( date1 = Sys.Date(), date2 = NULL, tidy = TRUE, tidy_style = "snake_case" )
mnis_mps_on_date( date1 = Sys.Date(), date2 = NULL, tidy = TRUE, tidy_style = "snake_case" )
date1 |
The date to return the list of mps from. Accepts character
values in |
date2 |
An optional query parameter. Accepts character values in
|
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
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.
## Not run: x <- mnis_mps_on_date(date1 = "2017-01-01", date2 = "2014-02-04") ## End(Not run)
## Not run: x <- mnis_mps_on_date(date1 = "2017-01-01", date2 = "2014-02-04") ## End(Not run)
Returns data on the numbers and gender of MPs, by party, for the given date, in either the House of Commons or the House of Lords.
mnis_party_state( house = "Commons", date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
mnis_party_state( house = "Commons", date = Sys.Date(), tidy = TRUE, tidy_style = "snake_case" )
house |
The house of parliament. Accepts either |
date |
The date to query party standing on. Accepts character values
in |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A tibble with information on the total numbers and gender of MPs, by party, for the given date and house.
## Not run: x <- mnis_party_state("2012-01-12") ## End(Not run)
## Not run: x <- mnis_party_state("2012-01-12") ## End(Not run)
Requests data on all peers who were members of the House of Lords on the
date specified, (if only date1
is included as a parameter), or on
or between the two dates if both date1
and date2
are
specified. Either date1
or date2
can be the latter of the
two dates.
mnis_peers_on_date( date1 = Sys.Date(), date2 = NULL, tidy = TRUE, tidy_style = "snake_case" )
mnis_peers_on_date( date1 = Sys.Date(), date2 = NULL, tidy = TRUE, tidy_style = "snake_case" )
date1 |
The date to return the list of peers from. Defaults to current
system date. Accepts character values in |
date2 |
An optional query parameter. Accepts character values in
|
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A tibble with information on all peers who were members of the
House of Lords on the date specified, (if only date1
is included
as a parameter), or on or between the two dates if both date1
and date2
are specified.
## Not run: x <- mnis_peers_on_date(date1 = "2017-01-01") ## End(Not run)
## Not run: x <- mnis_peers_on_date(date1 = "2017-01-01") ## End(Not run)
Returns a tibble with members with the specified interest or interests.
mnis_political_interests( interest, house = NULL, current = TRUE, tidy = TRUE, tidy_style = "snake_case" )
mnis_political_interests( interest, house = NULL, current = TRUE, tidy = TRUE, tidy_style = "snake_case" )
interest |
A single interest in the form of a string, or a character vector of interests. If a vector of multiple interests, returns all members who list all of those interests. |
house |
The house the member belongs to. Accepts 'commons', 'lords'
and |
current |
Logical. If |
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
A data frame of members with given interest(s).
## Not run: x <- mnis_political_interests(c("Africa", "Jamaica")) y <- mnis_political_interests(c("Africa", "Europe")) z <- mnis_political_interests(c("Africa", "Education")) ## End(Not run)
## Not run: x <- mnis_political_interests(c("Africa", "Jamaica")) y <- mnis_political_interests(c("Africa", "Europe")) z <- mnis_political_interests(c("Africa", "Education")) ## End(Not run)
Functions to tidy up the variable names returned from the API, and turn dates and datetimes to POSIXct.
member_tidy
ref_tidy
mnis_tidy(df, tidy_style = "snake_case") member_tidy(df) ref_tidy(df, tidy_style)
mnis_tidy(df, tidy_style = "snake_case") member_tidy(df) ref_tidy(df, tidy_style)
df |
The tibble to tidy. |
tidy_style |
The style to tidy the tibble with. |
Reference data on various aspects of parliament. This data is useful for
providing parameters for other function calls. The functions do not accept
any arguments aside from the tidy
and tidy_style
parameters,
which default to TRUE
and 'snake_case'
, respectively. To
return all a list with tibbles of all reference data,
see mnis_all_reference()
.
ref_address_types(tidy = TRUE, tidy_style = "snake_case") ref_answering_bodies(tidy = TRUE, tidy_style = "snake_case") ref_areas(tidy = TRUE, tidy_style = "snake_case") ref_area_types(tidy = TRUE, tidy_style = "snake_case") ref_biography_categories(tidy = TRUE, tidy_style = "snake_case") ref_cabinets(tidy = TRUE, tidy_style = "snake_case") ref_committees(tidy = TRUE, tidy_style = "snake_case") ref_committee_types(tidy = TRUE, tidy_style = "snake_case") ref_constituencies(tidy = TRUE, tidy_style = "snake_case") ref_constituency_areas(tidy = TRUE, tidy_style = "snake_case") ref_constituency_types(tidy = TRUE, tidy_style = "snake_case") ref_countries(tidy = TRUE, tidy_style = "snake_case") ref_departments(tidy = TRUE, tidy_style = "snake_case") ref_disqualification_types(tidy = TRUE, tidy_style = "snake_case") ref_elections(tidy = TRUE, tidy_style = "snake_case") ref_election_types(tidy = TRUE, tidy_style = "snake_case") ref_end_reasons(tidy = TRUE, tidy_style = "snake_case") ref_experience_types(tidy = TRUE, tidy_style = "snake_case") ref_government_post_departments(tidy = TRUE, tidy_style = "snake_case") ref_government_posts(tidy = TRUE, tidy_style = "snake_case") ref_government_ranks(tidy = TRUE, tidy_style = "snake_case") ref_honourary_prefixes(tidy = TRUE, tidy_style = "snake_case") ref_honour_lists(tidy = TRUE, tidy_style = "snake_case") ref_honours(tidy = TRUE, tidy_style = "snake_case") ref_interest_categories(tidy = TRUE, tidy_style = "snake_case") ref_lords_membership_types(tidy = TRUE, tidy_style = "snake_case") ref_lords_ranks(tidy = TRUE, tidy_style = "snake_case") ref_opposition_post_departments(tidy = TRUE, tidy_style = "snake_case") ref_opposition_posts(tidy = TRUE, tidy_style = "snake_case") ref_opposition_ranks(tidy = TRUE, tidy_style = "snake_case") ref_other_parliaments(tidy = TRUE, tidy_style = "snake_case") ref_parliamentary_posts(tidy = TRUE, tidy_style = "snake_case") ref_parliamentary_ranks(tidy = TRUE, tidy_style = "snake_case") ref_parliament_types(tidy = TRUE, tidy_style = "snake_case") ref_parties(tidy = TRUE, tidy_style = "snake_case") ref_party_sub_types(tidy = TRUE, tidy_style = "snake_case") ref_photo_outputs(tidy = TRUE, tidy_style = "snake_case") ref_statuses(tidy = TRUE, tidy_style = "snake_case") ref_titles(tidy = TRUE, tidy_style = "snake_case")
ref_address_types(tidy = TRUE, tidy_style = "snake_case") ref_answering_bodies(tidy = TRUE, tidy_style = "snake_case") ref_areas(tidy = TRUE, tidy_style = "snake_case") ref_area_types(tidy = TRUE, tidy_style = "snake_case") ref_biography_categories(tidy = TRUE, tidy_style = "snake_case") ref_cabinets(tidy = TRUE, tidy_style = "snake_case") ref_committees(tidy = TRUE, tidy_style = "snake_case") ref_committee_types(tidy = TRUE, tidy_style = "snake_case") ref_constituencies(tidy = TRUE, tidy_style = "snake_case") ref_constituency_areas(tidy = TRUE, tidy_style = "snake_case") ref_constituency_types(tidy = TRUE, tidy_style = "snake_case") ref_countries(tidy = TRUE, tidy_style = "snake_case") ref_departments(tidy = TRUE, tidy_style = "snake_case") ref_disqualification_types(tidy = TRUE, tidy_style = "snake_case") ref_elections(tidy = TRUE, tidy_style = "snake_case") ref_election_types(tidy = TRUE, tidy_style = "snake_case") ref_end_reasons(tidy = TRUE, tidy_style = "snake_case") ref_experience_types(tidy = TRUE, tidy_style = "snake_case") ref_government_post_departments(tidy = TRUE, tidy_style = "snake_case") ref_government_posts(tidy = TRUE, tidy_style = "snake_case") ref_government_ranks(tidy = TRUE, tidy_style = "snake_case") ref_honourary_prefixes(tidy = TRUE, tidy_style = "snake_case") ref_honour_lists(tidy = TRUE, tidy_style = "snake_case") ref_honours(tidy = TRUE, tidy_style = "snake_case") ref_interest_categories(tidy = TRUE, tidy_style = "snake_case") ref_lords_membership_types(tidy = TRUE, tidy_style = "snake_case") ref_lords_ranks(tidy = TRUE, tidy_style = "snake_case") ref_opposition_post_departments(tidy = TRUE, tidy_style = "snake_case") ref_opposition_posts(tidy = TRUE, tidy_style = "snake_case") ref_opposition_ranks(tidy = TRUE, tidy_style = "snake_case") ref_other_parliaments(tidy = TRUE, tidy_style = "snake_case") ref_parliamentary_posts(tidy = TRUE, tidy_style = "snake_case") ref_parliamentary_ranks(tidy = TRUE, tidy_style = "snake_case") ref_parliament_types(tidy = TRUE, tidy_style = "snake_case") ref_parties(tidy = TRUE, tidy_style = "snake_case") ref_party_sub_types(tidy = TRUE, tidy_style = "snake_case") ref_photo_outputs(tidy = TRUE, tidy_style = "snake_case") ref_statuses(tidy = TRUE, tidy_style = "snake_case") ref_titles(tidy = TRUE, tidy_style = "snake_case")
tidy |
If |
tidy_style |
The style to convert variable names to, if
|
mnis_reference
functionsref_address_types
The types of addresses available in
member's contact details. Includes websites and social media, as well
as physical addresses
ref_answering_bodies
The bodies that members' can address
questions to
ref_areas
Geographic areas
ref_area_types
Identifiers for grouping areas
(e.g. borough constituencies)
ref_biography_categories
Member biography categories
ref_cabinets
Connections that a member has to the cabinet or
shadow cabinet
ref_committees
Identifier for parliamentary committees
ref_committee_types
Types of parliamentary committees
ref_constituencies()
All constituencies
ref_constituency_areas()
The links between constituencies and
constituency areas
ref_constituency_types()
Constituency categories
ref_countries()
List of countries that could be listed as
members' birthplace
ref_departments()
Government and opposition departments
ref_disqualification_types()
Types of ways members can be
disqualified from sitting in the House
ref_elections()
Codes of general and by-elections
ref_election_types()
Election categories
ref_end_reasons()
Reasons a member may leave the House of
Lords or the House of Commons
ref_experience_types()
Types of non-parliamentary experience
members can list
ref_government_post_departments()
All deparments that can
contain government posts
ref_government_posts()
All government posts
ref_government_ranks()
All government post ranks
ref_honourary_prefixes()
The types of honourary prefixes
for members
ref_honour_lists()
The types of honour lists that a member
may be honoured in
ref_honours()
The different honours available to members
ref_interest_categories()
The categories available for
reporting financial interests
ref_lords_membership_types()
Different types of membership
of the House of Lords
ref_lords_ranks()
Ranks that peers may hold
ref_opposition_post_departments()
The link between opposition
posts and the government department they shadow
ref_opposition_posts()
Opposition posts
ref_opposition_ranks()
How opposition posts are ranked
ref_other_parliaments()
Other parliaments that a member
may have sat in
ref_parliamentary_posts()
The different parliamentary posts
available
ref_parliamentary_ranks()
How those parliamentary posts are
ranked
ref_parliament_types()
Types of parliaments that
parliamentary data may link to
ref_parties()
All parties that members can be affiliated with
ref_party_sub_types()
Sub-types of parties
ref_photo_outputs()
Outputs that a photo of a member
may be linked to
ref_statuses()
A member's possible current status in the
House
ref_titles()
Salutory titles
A function to strip Byte Order Marks (BOM) out of JSON data returned from the API.
tidy_bom(df)
tidy_bom(df)
df |
The GET returned from call to API. |