voting_record: Voting Record in LegCo Meetings

Description Usage Arguments Details See Also Examples

View source: R/voting_record.R

Description

Fetch voting records of LegCo council, the Finance Committee and its subcommittees and the House Committee 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
26
27
28
29
30
31
32
33
voting_record(
  committee = NULL,
  term_id = NULL,
  result = "all",
  vote = "all",
  name_ch = NULL,
  name_en = NULL,
  separate_mechanism = NULL,
  mover_type = "all",
  from = "1900-01-01 00:00:00",
  to = Sys.time(),
  n = 10000,
  extra_param = NULL,
  count = FALSE,
  verbose = TRUE
)

legco_voting_record(
  committee = NULL,
  term_id = NULL,
  result = "all",
  vote = "all",
  name_ch = NULL,
  name_en = NULL,
  separate_mechanism = NULL,
  mover_type = "all",
  from = "1900-01-01 00:00:00",
  to = Sys.time(),
  n = 10000,
  extra_param = NULL,
  count = FALSE,
  verbose = TRUE
)

Arguments

committee

the name of the committee or subcommittee. Defaults to NULL.

term_id

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

result

the voting result. If "passed", returns motions that have been passed. If "vetoed", returns motions that have been vetoed.If "all", returns all motions that has been voted in LegCo. Defaults to all.

vote

the vote cast. If "yes", returns only members who cast affirmative votes. If "no", returns only members who cast negative votes. If "abstain", returns only members who abstained from voting. If "absent", returns only members who were absent. If "present", returns only members who were present and did not vote (e.g. President). If "all", returns all votes. Defaults to "all".

name_ch

the name of a LegCo member in Traditional Chinese, or a vector of names. If NULL, returns voting records of all members. Defaults to NULL.

name_en

the name of a LegCo member in English, or a vector of names. If the member has an English name, the English name should go first followed by the surname in capital letters, e.g. "Peter CHAN". If the member does not have an English name, the surname in capital letters should go first followed by the translated first name with a hyphen separating the different syllable, e.g. "CHAN Tai-man". Check the names of the members with member(). If NULL, returns voting records of all members. Defaults to NULL.

separate_mechanism

only fetch votes that were counted with the vote separate mechanism, i.e. requiring majority in both geographical and functional constituencies to pass. If NULL, returns all votes regardless of the vote counting mechanism used. Defaults to NULL.

mover_type

the type of motion being put on vote. If "PO", returns votes on government motions only. If "MB", returns votes on members' motions only. If "all", returns votes on all motions. Defaults to "all".

from

only fetch results of meetings on or after this date and time. Accepts character values in "YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS" 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 00:00:00".

to

only fetch results of meetings on or before this date and time. Accepts character values in "YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS" 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 time.

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 vVotingResult data endpoint of the Voting Result Database.

See Also

LegCo API documentation for the Voting Record database: https://www.legco.gov.hk/odata/english/vrdb.html

Examples

1
2
3
4
5
# Fetch how members voted the motion on
# Abolishing the MPF Offsetting Mechanism on November 11, 2016
x <- voting_record(committee = "Council Meeting",
                   from = "2016-11-16 13:51:53",
                   to = "2016-11-16 13:51:53")

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