Learn R Programming

hansard (version 0.4.0)

members_search: members_search

Description

Search for an MP or Lord by name and constituency

Usage

members_search(search = NULL, tidy = TRUE)

Arguments

search

Accepts any string. Defaults to NULL.

tidy

Fix the variable names in the data frame to remove extra characters, superfluous text and convert variable names to snake_case. Defaults to TRUE.

Details

Function searches for the string and returns a data frame with all matches from both houses of parliament. Returns all partial matches in the members' names, constituencies, twitter handle and webpage. The default search is NULL, which returns a data frame of all members of both houses, the same result as members('all').

Examples

Run this code


x <- members_search('chris')

x <- members_search(Search='chris')

Run the code above in your browser using DataLab