knitr::opts_chunk$set(message = FALSE) library(legco) library(httptest) start_vignette("schedule")
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.
Here are the key identifies that is useful for locating the necessary data from the Meeting Schedule Database:
CommitteeID
is the numerical ID of a LegCo committee.
SlotID
is the numerical ID of a Council or committee meeting slot.
MemberID
is the numerical ID of a LegCo member. Note that it is a separate identifier from the SpeakerID
of the Hansard Database.
TermID
is the numerical ID of a LegCo term. Note that the nominal number of a TermID is less than that
of the term number by 1, i.e. the TermID of the fifth term is 4
.
SessionID
is the numerical ID of a LegCo session. A LegCo session typically begins in October to September
next year. As a term is four years, there are four sessions in one term.
MeetID
is the numerical ID of a Council or committee meeting. Although similar it is a separate
identifier from the SlotID
and is only used to match with records from the Attendance Database.
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()
fetches the details of one or more LegCo term(s).
# Fetch all LegCo terms term()
change_state() Sys.sleep(2)
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()
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()
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()
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()
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()
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()
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()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.