download_appg: Download Register of All-Party Parliamentary Groups

Description Usage Arguments Examples

View source: R/cache.R

Description

download_appg scrapes and caches entries in the Register of All-Party Parliamentary Groups. It is not necessary to assign when using download_appg(), although if you do a list object of raw tables is returned. If the environment is closed the cached download will be lost.

Usage

1
download_appg(register_date, pause = 1, save = FALSE)

Arguments

register_date

A character string of the date of the register of interest written within a pair of single qoute or double qoutes. The date must be in ISO 8601 format, i.e. ("YYYY-MM-DD").

pause

A non-negative numeric indicating length of time in seconds to pause between accessing APPG pages. Set to 1 by default. A longer pause helps minimise burden on the Parliamentary website.

save

A boolean which if TRUE saves the cached tables as a series of .csv files. Additionally, a list object of the raw APPG download is saved as an .RDS file. All files are saved in the current working environmnent. By default save is FALSE.

Examples

1
2
3
4
download_appg("2019-11-05")
download_appg("2019-11-05", pause = 0.5)
download_appg("2019-11-05", pause = 0.5, save = TRUE)
data <- download_appg("2019-11-05")

dempseynoel/parlygroups documentation built on Sept. 9, 2020, 8:07 a.m.