petitions: Petitions in LegCo

Description Usage Arguments Details Functions See Also Examples

View source: R/petitions.R

Description

Fetch petitions presented in LegCo council meetings.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
petitions(
  rundown_id = NULL,
  hansard_id = NULL,
  lang = "en",
  from = "1900-01-01",
  to = Sys.Date(),
  floor = FALSE,
  n = 1000,
  extra_param = NULL,
  count = FALSE,
  verbose = TRUE
)

legco_petitions(
  rundown_id = NULL,
  hansard_id = NULL,
  lang = "en",
  from = "1900-01-01",
  to = Sys.Date(),
  floor = FALSE,
  n = 1000,
  extra_param = NULL,
  count = FALSE,
  verbose = TRUE
)

Arguments

rundown_id

the id of a rundown, or a vector of ids. If NULL, returns results of all rundowns. Defaults to NULL.

hansard_id

the id of a hansard file, or a vector of ids. If NULL, returns results of all hansard files. Defaults to NULL.

lang

the language of hansard files to search from. "en" returns the English version. "zh" returns the Traditional Chinese version. Defaults to "en".

from

only fetch results of meetings on or after this date. Accepts character values in "YYYY-MM-DD" format, and objects of class Date, POSIXt, POSIXct, POSIXlt or anything else that can be coerced to a date with as.Date(). Defaults to "1900-01-01".

to

only fetch results of meetings on or before this date. Accepts character values in "YYYY-MM-DD" format, and objects of class Date, POSIXt, POSIXct, POSIXlt or anything else that can be coerced to a date with as.Date(). Defaults to the current system date.

floor

logical: whether to fetch results from the floor version of the hansard files? The floor version is the first presented version of hansard file in the original language delivered by the speakers in LegCo. If TRUE, the language option is ignored. Defaults to FALSE.

n

the number of record to fetch. Defaults to 1000.

extra_param

additional query parameters defined in LegCo API. Must begin with "&".

count

logical: Whether to return only the total count of records that matches the parameter(s) instead of the result. Defaults to FALSE.

verbose

logical: Whether to display progress messages when fetching data? Defaults to TRUE.

Details

This function corresponds to the Petitions data endpoint of the Hansard Database.

Functions

Functions of the Hansard database:

See Also

LegCo API documentation for the Hansard database: https://www.legco.gov.hk/odata/english/hansard-db.html

Examples

1
2
# Fetch petition laid during the Council meeting on January 19, 2018
x <- petitions(from = "2018-01-10")

legco documentation built on Oct. 16, 2021, 5:09 p.m.