Meeting Schedule Database

knitr::opts_chunk$set(message = FALSE)
library(legco)
library(httptest)
start_vignette("schedule")

Introduction

This database contains the information of LegCo committees, namely the name of all LegCo committees established since the fifth term and their corresponding member lists and meeting schedule.

For more details of the database, see https://www.legco.gov.hk/odata/english/schedule-db.html.

Key Identifiers

Here are the key identifies that is useful for locating the necessary data from the Meeting Schedule Database:

Total Count

All functions in this database (except term()) have an option to return only the total count of the records matching the specified parameters instead of returning the data frame containing the result. To activate this option, specify count = TRUE:

# Fetch the total number of members in the Bills Committee on Fugitive Offenders and
# Mutual Legal Assistance in Criminal Matters Legislation (Amendment) Bill 2019
membership(committee_id = 3005, count = TRUE)
change_state()
Sys.sleep(2)

This database is accessible with the following functions:

term()

term() fetches the details of one or more LegCo term(s).

# Fetch all LegCo terms
term()
change_state()
Sys.sleep(2)

session()

session() fetches the details of one or more LegCo session(s).

# Fetch all LegCo sessions of the fifth term
session(term_id = 4)
change_state()
Sys.sleep(2)

committee()

committee() fetches the details of one or more LegCo committee(s).

# Fetch all LegCo committees from the sixth term
v <- committee(term_id = 5)
head(v)
change_state()
Sys.sleep(2)

membership()

membership() fetches the membership of one or more LegCo member(s) or the members of one or more committee(s).

# Fetch members of the Subcommittee on Issues Relating to Bazaars
v <- membership(committee_id = 2704)
head(v)
change_state()
Sys.sleep(2)
# Fetch the committee membership of Hon Wu Chi-wai
v <- membership(member_id = 834)
head(v)
change_state()
Sys.sleep(2)

member()

member() fetches the basic information of one or more LegCo members.

# Fetch full list of members
v <- member()
head(v)
change_state()
Sys.sleep(2)

Note that member() only returns the latest term that the member has served as LatestTermID. To fetch all the terms served by a member since the fifth term, use member_term() instead.

member_term()

member_term() fetches the all the term served by one or more LegCo members.

#Fetches the term served by Hon Chan Kin-por and Kwong Chun-yu
member_term(member_id = c(273, 924))
change_state()
Sys.sleep(2)

Note that members who have served more than one term will have more than one entry, e.g. the member with MemberID 245 as shown above.

meeting()

meeting() fetches the meeting schedule of Council or committees. Note that this function does not take CommitteeID as a filtering parameter. Use meeting_committee() instead if needed.

# Fetch all meeting conducted on March 20, 2019
meeting(from = "2019-03-20", to = "2019-03-20")
change_state()
Sys.sleep(2)

meeting_committee()

meeting_committee() fetches the meeting schedule of Council or committees. Note that this function does not support dates as filtering parameters. Use meeting() instead if needed.

# Fetch all meetings of Subcommittee on Issues Relating to Bazaars
v <- meeting_committee(committee_id = 2704)
head(v)
end_vignette()


Try the legco package in your browser

Any scripts or data that you put into this service are public.

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