Learn R Programming

hansard (version 0.6.0)

hansard_generic: Hansard - Generic API Function

Description

A semi-generic function for the parliamentary API. Provides greater flexibility, including any newly released features or data not yet included in the individual functions of the hansard package.

Usage

hansard_generic(path)

Arguments

path

The url path to the data you wish to retrieve.

Details

Users must specify '.json?' in their path. The function uses the default of 10 items per page, to include more include '&_pageSize=[number]', e.g. '&_pageSize=500' to specifiy the maximum amount of 500 items per page.

This function does not tidy any variable names.

Examples

Run this code
# NOT RUN {
x <- hansard_generic('elections.json?')

y <- hansard_generic('elections.json?electionType=General Election')
# }

Run the code above in your browser using DataLab