Electricity Consumption by Use

API Detailed Documentation

API URL:

API Data Enquiry

Output Fields (JSON) Swagger Format
 
Name Type Unit Of Measure Description
Ele_yr Date As at end of Year
Ele_tot_a Number Million MJ/Terajoule Total Consumption
Ele_dom_a Number Million MJ/Terajoule Domestic
Ele_com_a Number Million MJ/Terajoule Commercial
Ele_ind_a Number Million MJ/Terajoule Industrial
Ele_stlt_a Number Million MJ/Terajoule Street Lighting
Ele_exchi_a Number Million MJ/Terajoule Export to China
Footnotes
Electricity Consumption by Use
Period: 1947-2002
Unit: Million MJ/Terajoule
Source: The Far Eastern Economic Review, 1950, Vol. 8, p.271.
The data are from government announcements/publications.
Note: Data for 1947-67: Hong Kong Statistics 1947-67;
Data for 1968-2002: Hong Kong Annual Digest of Statistics;
Sources for HK Statistics 1947-67 and Hong Kong Annual Digest of Statistics:
Hong Kong Electric Co., Ltd., China Light & Power Co., Ltd., Cheung Chau Electric Co., Ltd.
Javascript Example
$.ajax({
url: 'https://api.hkma.gov.hk/public/hkimr/electricity?offset=0',
dataType:'json',
success:function(data){
alert('results found:'+ data.result.datasize)
}
});
 
Python Example
import urllib.request
url = 'https://api.hkma.gov.hk/public/hkimr/electricity?offset=0'
with urllib.request.urlopen (url) as req:
print (req.read())