Introduction

This database contains information on matters discussed in Council meeting since the fifth term of LegCo. Hinting by its name, the database is built upon the PDF hansard files. Relying on the bookmarks and section codes of the hansard files, the data endpoints retrieve data from the files directly.

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

Key Identifiers

Here are the key identifies that is useful for locating the necessary data from the Hansard database:

  • HansardID is the numerical ID of a hansard file. A hansard file is the Record of Proceedings of a Council meeting. Since there are three versions of hansard—Floor Chinese and English, each Council meeting has three hansard files, meaning that there are three Hansard IDs corresponding to the same meeting.

  • RundownID is the numerical ID of a rundown in the hansard file. In simple terms, rundowns can be understood as individual paragraphs in the Record of Proceedings.

  • SectionCode is the alphabetical code stipulating the type of business as indicated in the LegCo Rules of Procedures 18(1) that a paragraph text is referring to in the hansard file.

  • BookmarkName is the alphabetical code stipulating details of the rundown. A detailed explanation can be found here.

  • SpeakerID is the numerical ID stipulating the speaker of a paragraph text in the hansard file.

These identifiers essentially indicate the when (HansardID), where (RundownID), what (SectionCode) and who (SpeakerID) of a paragraph text in the Record of Proceedings.

Total Count

All functions in this database 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 questions put on the government in LegCo in April, 2019
v <- questions(from = "2019-04-01", to = "2019-04-30", count = TRUE)
v
## [1] "44"

This database is accessible with the following functions/data:

hansard()

hansard() fetches the information of the hansard files.

v <- hansard(from = "2019-02-20", to = "2019-02-20")
v
##   HansardID         MeetingDate          AgendaDate isCEQandA isCEQT
## 1      2691 2019-02-20 00:00:00 2019-02-20 00:00:00         0      1
## 2      2714 2019-02-20 00:00:00 2019-02-20 00:00:00         0      0
##                                                                         HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220q-translate-e.pdf
## 2  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf

If isCEQandA is 1, the hansard file is the Record of Proceedings of a Chief Executive’s Question and Answer Session.

If isCEQT is 1, the hansard file is the Record of Proceedings of a Chief Executive’s Question Time.

legco_section_type

legco_section_type is a data frame containing the meaning of the section code.

v <- legco_section_type
head(v)
##   SectionCode
## 1         r2r
## 2         oth
## 3         pex
## 4         orq
## 5         sta
## 6         rsl
##                                                                            NameEng
## 1                                   Remaining proceedings after the Second Reading
## 2                                                                   Taking of Oath
## 3                                                            Personal Explanations
## 4                                                                   Oral Questions
## 5                                                    Statements by Public Officers
## 6 Request for Special Leave of the Council to Give Evidence of Council Proceedings
##                                        NameChi
## 1                             二讀後的餘下程序
## 2                               作出立法會誓言
## 3                                     個人解釋
## 4                                     口頭質詢
## 5                                     官員聲明
## 6 就立法會會議程序提供證據一事請求給予特別許可

subjects()

subjects() fetches all subjects being discussed in a Council meeting.

# Fetch second reading of bills during the Council meeting on February 20, 2019
v <- subjects(hansard_id = 2714, section_code = "b2r")
head(v)
##           MeetingDate                                       Subject
## 1 2019-02-20 00:00:00            SECOND READING OF GOVERNMENT BILLS
## 2 2019-02-20 00:00:00 Smoking (Public Health) (Amendment) Bill 2019
## 3 2019-02-20 00:00:00             Trade Marks (Amendment) Bill 2019
##   ResumptionOf SectionCode RundownID HansardID
## 1           NA         b2r    899626      2714
## 2           NA         b2r    899628      2714
## 3           NA         b2r    899650      2714

The RundownID indicates the starting RundownID of the subject concerned. For instance, the starting RundownID of Smoking (Public Health) (Amendment) Bill 2019 is 899628, meaning that the paragraph text of this subject is from 899628 to 899649.

If the business is a continuation of a previous meeting, the date of the previous meeting will be shown in the field ResumptionOf.

speakers()

speakers() fetches the basic information of speakers in LegCo council meetings. Speakers here refer to all personnel who can speak during the meetings, which include not only LegCo members but also government officials and Secretariat staff.

# Fetch a list of all speakers in LegCo council meetings
v <- speakers()
head(v)
##   SpeakerID        NameChi                            NameEng Type Initial
## 1         6       行政長官                    CHIEF EXECUTIVE   PO      CE
## 2         2           秘書                              CLERK   LC     CLK
## 3         4     全委會主席                           CHAIRMAN   LC      CM
## 4         7     政務司司長 CHIEF SECRETARY FOR ADMINISTRATION   PO     CSA
## 5         5 代理全委會主席                    DEPUTY CHAIRMAN   LC     DCM
## 6         3       代理主席                   DEPUTY PRESIDENT   LC    DPSD
##   FirstName LastName
## 1                   
## 2                   
## 3                   
## 4                   
## 5                   
## 6
# Fetch a list of all speakers who are LegCo members
v <- speakers(type = "MB")
head(v)
##   SpeakerID NameChi          NameEng Type Initial   FirstName LastName
## 1       108  梁志祥 LEUNG CHE-CHEUNG   MB     LCC  Che-cheung    LEUNG
## 2       138  林卓廷   LAM CHEUK-TING   MB     LCT  Cheuk-ting      LAM
## 3        35  李卓人    LEE CHEUK-YAN   MB     LCY   Cheuk-yan      LEE
## 4       120  廖長江      MARTIN LIAO   MB      ML Cheung-kong     LIAO
## 5       104  陳志全   CHAN CHI-CHUEN   MB     CCC   Chi-chuen     CHAN
## 6       148  許智峯     HUI CHI-FUNG   MB     HCF    Chi-fung      HUI
# Look up the details of a speaker with the id 6
speakers(speaker_id = 6)
##   SpeakerID  NameChi         NameEng Type Initial FirstName LastName
## 1         6 行政長官 CHIEF EXECUTIVE   PO      CE

Every single paragraph in the hansard files (excluding section titles and summoning of bells) is marked with the unique Speaker ID to indicate the speaker of the text.

rundown()

rundown() fetches the paragraph text in hansard files. Note that the result is not in any specific order so it is necessary to reorder if needed.

# Fetch records of proceedings of the second reading of Smoking (Public Health) (Amendment) Bill 2019
v <- rundown(rundown_id = 899628:899649)
v <- v[order(v$RundownID), ]
rownames(v) <- 1:nrow(v)
v[3:5, ]
##   RundownID         MeetingDate
## 3    899630 2019-02-20 00:00:00
## 4    899631 2019-02-20 00:00:00
## 5    899632 2019-02-20 00:00:00
##                                                                                                     Content
## 3 DEPUTY PRESIDENT (in Cantonese): Secretary, please hold on.  Mr SHIU Ka-fai, what is your point of order?
## 4              MR SHIU KA-FAI (in Cantonese): Deputy President, I think a quorum is lacking in the Chamber.
## 5                                          DEPUTY PRESIDENT (in Cantonese): Are you requesting a headcount?
##       BookmarkName SpeakerID HansardID
## 3 SP_LC_DPSD_00206         3      2714
## 4  SP_MB_SKF_00207       140      2714
## 5 SP_LC_DPSD_00208         3      2714
##                                                                                                   HansardFileURL
## 3 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=SP_LC_DPSD_00206
## 4  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=SP_MB_SKF_00207
## 5 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=SP_LC_DPSD_00208

Though of little use, BookmarkName can be a useful parameter to search for the necessary data. The BookmarkName of the starting Rundown of a subject is a combination of section code and the sequence number. For instance, the two bills that were under the process of second reading have a BookmarkName of “b2r01” and “b2r02” respectively. Therefore, it is possible to directly fetch the starting RundownID of the first bill under second reading on February 20, 2019, i.e. Smoking (Public Health) (Amendment) Bill 2019, by specifying the BookmarkName:

# Fetch the first bill under second reading on February 20, 2019
v <- rundown(bookmark_name = "b2r01", from = "2019-02-20", to = "2019-02-20")
v
##   RundownID         MeetingDate                                       Content
## 1    899628 2019-02-20 00:00:00 Smoking (Public Health) (Amendment) Bill 2019
##   BookmarkName SpeakerID HansardID
## 1        b2r01        NA      2714
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b2r01

Similarly, it can be applicable on other SectionCode as well, such as “pop01” and “pop02”.

questions()

questions() fetches the question put on the government by LegCo members. Note that this function does not take HansardID as a filtering parameter.

# Fetch questions being put on the government during the Council meeting on February 20, 2019
v <- questions(from = "2019-02-20", to = "2019-02-20")
head(v)
##           MeetingDate QuestionType
## 1 2019-02-20 00:00:00         Oral
## 2 2019-02-20 00:00:00         Oral
## 3 2019-02-20 00:00:00         Oral
## 4 2019-02-20 00:00:00         Oral
## 5 2019-02-20 00:00:00         Oral
## 6 2019-02-20 00:00:00         Oral
##                                                            Subject
## 1                                    Following up marine incidents
## 2                         The overloaded public health care system
## 3     Alleviating the pressure on the services of public hospitals
## 4    Medical and nursing manpower in the public health care system
## 5                                    Regulation of e-sports venues
## 6 Construction documentation of the Shatin to Central Link project
##          Speaker SpeakerID RundownID
## 1      STEVEN HO        97    899439
## 2      WILSON OR       143    899457
## 3   CHAN HOI-YAN       161    899479
## 4    HELENA WONG       117    899496
## 5     JEREMY TAM       157    899514
## 6 LAM CHEUK-TING       138    899529
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq01
## 2 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq02
## 3 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq03
## 4 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq04
## 5 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq05
## 6 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=orq06

Similar to the output of subjects(), RundownID here refers to the starting RundownID, which can be used to determine the range of the full question text.

bills()

bills() fetches bills being debated in LegCo Council meetings.

# Fetch bills debated during the Council meeting on February 20, 2019
v <- bills(hansard_id = 2714)
head(v)
##           MeetingDate
## 1 2019-02-20 00:00:00
## 2 2019-02-20 00:00:00
## 3 2019-02-20 00:00:00
## 4 2019-02-20 00:00:00
## 5 2019-02-20 00:00:00
## 6 2019-02-20 00:00:00
##                                                                  Subject
## 1                          Smoking (Public Health) (Amendment) Bill 2019
## 2                                      Trade Marks (Amendment) Bill 2019
## 3 Inland Revenue (Profits Tax Exemption for Funds) (Amendment) Bill 2018
## 4                           Inland Revenue (Amendment) (No. 7) Bill 2018
## 5                          Smoking (Public Health) (Amendment) Bill 2019
## 6                          Smoking (Public Health) (Amendment) Bill 2019
##                                                   Section SectionCode RundownID
## 1                       First Reading of Government Bills         b1r    899623
## 2                       First Reading of Government Bills         b1r    899624
## 3 Resumption of Second Reading Debate on Government Bills         b2d    899655
## 4 Resumption of Second Reading Debate on Government Bills         b2d    899698
## 5                      Second Reading of Government Bills         b2r    899628
## 6                                  Withdrawal of the Bill         b2r    899628
##   HansardID
## 1      2714
## 2      2714
## 3      2714
## 4      2714
## 5      2714
## 6      2714
##                                                                                         HansardFileURL
## 1  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b1r01
## 2  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b1r02
## 3 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b2d01a
## 4 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b2d02a
## 5  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b2r01
## 6  https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=b2r01

Note that the name of a bill may appear more than once like above, since the bill went through first and second reading in the same meeting. To fetch more detailed information and key dates of a particular bill, use all_bills() instead.

motions()

motions() fetches the motions discussed in Council meetings.

# Fetch motions discussed during the Council meeting on February 20, 2019
v <- motions(hansard_id = 2714)
head(v)
##           MeetingDate
## 1 2019-02-20 00:00:00
## 2 2019-02-20 00:00:00
## 3 2019-02-20 00:00:00
##                                                                                                                                  Subject
## 1                                            Proposed resolution under section 34(4) of the Interpretation and General Clauses Ordinance
## 2 Proposed resolution under Article 75 of the Basic Law of the Hong Kong Special Administrative Region of the People's Republic of China
## 3                                                                 Motion under the Legislative Council (Powers and Privileges) Ordinance
##            Section SectionCode RundownID HansardID
## 1 Members' motions         mbm    899758      2714
## 2 Members' motions         mbm    899768      2714
## 3 Members' motions         mbm    899812      2714
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=mbm01
## 2 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=mbm02
## 3 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=mbm03

Similar to the output of subjects() and questions(), RundownID here refers to the starting RundownID, which can be used to determine the range of the full question text.

petitions()

petitions() fetches the petitions raised by LegCo members in Council meetings.

# Fetch petition laid during the Council meeting on January 19, 2018
v <- petitions(from = "2018-01-10")
v
##           MeetingDate
## 1 2018-01-10 00:00:00
##                                                                                       Subject
## 1 Mr Charles Peter MOK, with the other three Members, will present a petition to this Council
##            Speakers RundownID HansardID
## 1 CHARLES PETER MOK    781135      2278
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr17-18/english/counmtg/hansard/cm20180110-translate-e.pdf#nameddest=pop01

addresses()

addresses() fetches fetches addresses made by members or government officials while presenting papers to the Council.

# Fetch addresses given during the Council meeting on February 20, 2019
v <- addresses(hansard_id = 2714)
v
##           MeetingDate
## 1 2019-02-20 00:00:00
##                                                                                                                                                                                                                                                       Subject
## 1 Report of the Public Accounts Committee on the Reports of the Director of Audit on the Accounts of the Government of the Hong Kong Special Administrative Region for the year ended 31 March 2018 and the Results of Value for Money Audits (Report No. 71)
##        Speaker RundownID HansardID
## 1 ABRAHAM SHEK    899435      2714
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=add01

statements()

statements() fetches statements made by government officials in Council meetings.

# Fetch statements made by government officials during the Council meeting on April 22, 2015
v <- statements(from = "2015-04-22")
v
##           MeetingDate
## 1 2015-04-22 00:00:00
##                                                                                                   Subject
## 1 Consultation Report and Proposals on the Method for Selecting the Chief Executive by Universal Suffrage
##                              Speaker RundownID HansardID
## 1 CHIEF SECRETARY FOR ADMINISTRATION    408564       997
##                                                                                        HansardFileURL
## 1 https://www.legco.gov.hk/yr14-15/english/counmtg/hansard/cm20150422-translate-e.pdf#nameddest=sta01

voting_results()

voting_results() fetches the results of votes conducted in Council meetings.

# Fetch results of votes conducted during the Council meeting on January 19, 2018
v <- voting_results(hansard_id = 2714)
head(v)
##           MeetingDate
## 1 2019-02-20 00:00:00
## 2 2019-02-20 00:00:00
## 3 2019-02-20 00:00:00
## 4 2019-02-20 00:00:00
## 5 2019-02-20 00:00:00
## 6 2019-02-20 00:00:00
##                                                                  Subject
## 1 Inland Revenue (Profits Tax Exemption for Funds) (Amendment) Bill 2018
## 2 Inland Revenue (Profits Tax Exemption for Funds) (Amendment) Bill 2018
## 3 Inland Revenue (Profits Tax Exemption for Funds) (Amendment) Bill 2018
## 4 Inland Revenue (Profits Tax Exemption for Funds) (Amendment) Bill 2018
## 5                           Inland Revenue (Amendment) (No. 7) Bill 2018
## 6                           Inland Revenue (Amendment) (No. 7) Bill 2018
##   VoteResult SectionCode RundownID HansardID
## 1     Passed         b2d    899665      2714
## 2     Passed         cwc    899677      2714
## 3     Passed         cwc    899685      2714
## 4     Passed         b3r    899695      2714
## 5     Passed         b2d    899709      2714
## 6     Passed         cwc    899720      2714
##                                                                                                 HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00241
## 2 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00253
## 3 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00261
## 4 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00271
## 5 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00286
## 6 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_VOTED_00298

voting_results() only returns the overall result of the vote. To fetch the voting record of individual members, use voting_record() instead.

summoning_bells()

summoning_bells() fetches instances in which the summoning bell have been rung in LegCo Council meetings.

# Fetch instances of summoning bell during the Council meeting on January 19, 2018
v <- summoning_bells(hansard_id = 2714)
head(v)
##           MeetingDate SectionCode RundownID HansardID
## 1 2019-02-20 00:00:00         b2r    899635      2714
## 2 2019-02-20 00:00:00         mbm    899775      2714
##                                                                                                HansardFileURL
## 1 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_BELL_00211
## 2 https://www.legco.gov.hk/yr18-19/english/counmtg/hansard/cm20190220-translate-e.pdf#nameddest=EV_BELL_00354