Drive the API for TheyWorkForYou

An R wrapper around the API of TheyWorkForYou, a parliamentary monitoring site that scrapes and repackages Hansard (the UK's parliamentary record) and augments it with information from the Register of Members' Interests, election results, and voting records to provide a unified source of information about UK legislators and their activities. See < http://www.theyworkforyou.com> for details.


Travis-CI Build Status

This package wraps TheyWorkForYou's API for R. TheyWorkForYou is a parliamentary monitoring site that scrapes and repackages Hansard (the UK's parliamentary record) and augments it with information from the Register of Members' Interests, election results, and voting records to provide a unified source of information about UK legislators and their activities.

Set up

You'll need an API key to. Get it here.

Your first API call (or call to set_api_key) will prompt you to paste it into the R console, after which it will be available for all future R sessions.

Installation

Install twfy using devtools:

devtools::install_github("conjugateprior/twfy")

If this does not work

install.packages("devtools")

and try again.

Results

In general, API call results are returned as json, then parsed into nested data.frames and lists using jsonlite. One exception is getBoundary which returns a string of KML.

Documentation

Package documentation is incomplete. A more nearly complete set of documentation can be found from the API source.

News

twfy 0.1.0

  • First release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("twfy")

0.1.0 by Will Lowe, 2 years ago


https://conjugateprior.github.io/twfy


Report a bug at https://github.com/conjugateprior/twfy/issues


Browse source code at https://github.com/cran/twfy


Authors: Will Lowe [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports httr, jsonlite

Suggests knitr, rmarkdown


See at CRAN