{"id":124,"date":"2021-04-29T21:43:00","date_gmt":"2021-04-29T13:43:00","guid":{"rendered":"https:\/\/philip.twinight.co\/portfolio\/?p=124"},"modified":"2024-03-06T10:00:11","modified_gmt":"2024-03-06T02:00:11","slug":"relationship-between-temperature-and-electricity-consumption","status":"publish","type":"post","link":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/","title":{"rendered":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis"},"content":{"rendered":"\n<p>This is the group project of SDSC2004 &#8211; Data Visualization. I did the project in my year 1 2020\/21 Semester B.<\/p>\n\n\n\n<p><strong>Presentation Slides:<\/strong><\/p>\n\n\n<div class=\"ose-google-docs ose-uid-5e5371fb92dacfbe81150b3a41a3787c ose-embedpress-responsive\" style=\"width:600px; height:550px; max-height:550px; max-width:100%; display:inline-block;\" data-embed-type=\"GoogleDocs\"><iframe loading=\"lazy\" allowFullScreen=\"true\" src=\"https:\/\/docs.google.com\/presentation\/d\/e\/2PACX-1vS1Rr7wv6pjtM4Z5Gkrwa9U5EOglkFkYCxsSypWw6auFOsmYCTJu5RfhCkwfFvUyA\/embed?start=false&#038;loop=false&#038;delayms=3000\" frameborder=\"0\" width=\"600\" height=\"550\" allowfullscreen=\"true\" mozallowfullscreen=\"true\" webkitallowfullscreen=\"true\"><\/iframe><\/div>\n\n\n\n<p>Course Instructor: Dr. Yu Yang<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#1_Introduction\" >1. Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#2_Data_pre-processing\" >2. Data pre-processing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#3_Data_visualization_analytics\" >3. Data visualization &amp; analytics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#4_Conclusion\" >4. Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#5_References\" >5. References<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#6_Appedix\" >6. Appedix<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Introduction\"><\/span>1. Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Due to the excessive growth of Hong Kong annual mean temperature (Figure 4), it is quite the same as the rise of power consumption in Hong Kong. Albeit somewhat similarly, it may not have any correlation between temperature and electricity consumption of Hong Kong. It seems possible to find it out by using linear regression as it is assumed that a relationship between those two factors exists. In this report, there will be mainly two datasets used, one is the average temperature of every month from 1970 to 2020 in Hong Kong by <a href=\"http:\/\/data.gov.hk\" target=\"_blank\" rel=\"noreferrer noopener\"><em>DATA.GOV.HK<\/em><\/a>, and the other is the number of electricity usage including domestic, commercial, industrial from 1970 to 2020 in Hong Kong by the census and statistic department. They are all provided by the open API of the Hong Kong Government. This report will mention the method of getting data, how it can be processed, the challenges that occurred, and how it can be solved while analysing the data. Nevertheless, most importantly, it will mention the result of the linear regression of temperature and electricity consumption of Hong Kong.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Data_pre-processing\"><\/span>2. Data pre-processing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"text-decoration: underline;\">2.1 Data cleaning<\/span><\/p>\n\n\n\n<p>The temperature dataset from the government (Appendix) contains unknown variables. As can be seen in Figure 1, the temperature value and temperature unit contain mysterious values or units, such as the star (***) and hashtag (###) symbols. Under these conditions, it shows an error when the average temperature is calculated through the program.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=381956054  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"613\" height=\"277\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-1.png\" alt=\"\" class=\"wp-image-127\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:613\/h:277\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-1.png 613w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:136\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-1.png 300w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Figure 1: The temperature dataset including unknown values<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>As such, data-cleaning has been done for solving the phenomenon, which include the following actions:<\/p>\n\n\n\n<p>(1) The unknown star symbol (*) has been removed.<br>(2) The inconsistent data have been corrected. For example, the hashtag symbol (#) was<br>changed to the degree Celsius (C).<br>(3) The missing temperature value has been filled in after the unknown data is removed<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">2.2 Data Integration<\/span><\/p>\n\n\n\n<p>Temperature datasets from different weather stations from 1970 to 2020 (Appendix) is required. However, the datasets are not capable of being downloaded completely due to call limit protection in the API of the HKO site. It is needed to call the dataset separately to override the call limit protection. Further integration is required to merging the two dataset files into one by using coding (Figure 2).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=1365642244  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"833\" height=\"180\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-2.jpeg\" alt=\"\" class=\"wp-image-128\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:833\/h:180\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-2.jpeg 833w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:65\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-2.jpeg 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:166\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-2.jpeg 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 2: Coding used for merging two dataset files<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p><span style=\"text-decoration: underline;\">2.3 Data Transformation<\/span><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">2.3.1 Normalization<\/span><\/p>\n\n\n\n<p>In the datasets, there are different types of data which have different units. In addition, the range of the numbers are also different. It may result in difficult to calculate the data directly and hard to plot clear<\/p>\n\n\n\n<p>graphs. In order to solve the problem, we use normalization. We use python to change the data into a similar format so that it will be easy to calculate and plot the graphs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1288338514  loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"241\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-2.png\" alt=\"\" class=\"wp-image-154\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:814\/h:241\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-2.png 814w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:89\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-2.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:227\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-2.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 3: The code use for normalization<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Data_visualization_analytics\"><\/span>3. Data visualization &amp; analytics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"text-decoration: underline;\">3.1 Average Temperature in Hong Kong Between 1885-2020<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=216216185  loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"407\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-4.jpeg\" alt=\"\" class=\"wp-image-130\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:672\/h:407\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-4.jpeg 672w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:182\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-4.jpeg 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 4: Hong Kong Temperature Between 1885-2015<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Hong Kong Temperature Between 1885-2015 graph indicates an increasing trend in Hong Kong average temperature between 1885-2015. On average, the increasing rate between 1885-2020 is 0.13\u2103\/decade. And a steeper slope is reported between 1991-2020, the increasing rate between 1991-2020 is 0.24\u2103\/decade. +33% when comparing the increasing rate between 1885-2020 and 1991-2020.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">3.2 Data Visualization &amp; analytics in Hong Kong Electricity Consumption and Temperature<\/span><\/p>\n\n\n\n<p>To verify the correlation between Hong Kong electricity consumption and temperature, the calculation in P-values, coefficient of correlation (R-values) and coefficient of determination is needed.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=928685351  loading=\"lazy\" decoding=\"async\" width=\"552\" height=\"434\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-5.png\" alt=\"\" class=\"wp-image-131\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:552\/h:434\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-5.png 552w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:236\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-5.png 300w\" sizes=\"auto, (max-width: 552px) 100vw, 552px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 5: Electricity Consumption and Temperature in 1970<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>P= 6.673E-11(One-Tailed Test)<\/li>\n\n\n\n<li>R= 0.829927<\/li>\n\n\n\n<li>R^2= 0.688778825<\/li>\n<\/ul>\n\n\n\n<p>The result is significant at p &lt; .05, strong positive relation between electricity consumption and temperature in 1970 and 68.9% variation in electricity consumption that can be attributed to the temperature in 1970.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=229198901  loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"434\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-6.png\" alt=\"\" class=\"wp-image-132\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:562\/h:434\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-6.png 562w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:232\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-6.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 6: Electricity Consumption and Temperature in 2020<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>P= 2.79013E-09 (One-Tailed Test)<\/li>\n\n\n\n<li>R= 0.958913<\/li>\n\n\n\n<li>R^2= 0.919514142<\/li>\n<\/ul>\n\n\n\n<p>The result is significant at p &lt; .05, strong positive relation between electricity consumption and temperature in 2020 and 92.0% variation in electricity consumption that can be attributed to the temperature in 2020.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=807291488  loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"289\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-7.png\" alt=\"\" class=\"wp-image-133\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:481\/h:289\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-7.png 481w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:180\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-7.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 7: R-values between 1970-2020<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>R-value mean : 0.851730294<\/li>\n<\/ul>\n\n\n\n<p>The graph reveals a strong positive relation between electricity consumption and temperature between 1970-2020.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=149212825  loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"289\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-3.png\" alt=\"\" class=\"wp-image-157\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:481\/h:289\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-3.png 481w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:180\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/image-3.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Figure 8: Variance in R-values between 1970-2020<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>Range : 0.958913-0.745304<\/li>\n<\/ul>\n\n\n\n<p>There is little variance between R-values from 1970 to 2020, which indicates electricity consumption and temperature in every year follow a similar increasing trend.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=923616905  loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"289\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-9.png\" alt=\"\" class=\"wp-image-135\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:481\/h:289\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-9.png 481w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:180\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-9.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 9: R^2 values between 1970-2020<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>R^2 values mean: 0.727050259<\/li>\n<\/ul>\n\n\n\n<p>The result indicates around 73% variation in electricity usage that can be attributed to the temperature.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-opt-id=2110303788  loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"289\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-10.png\" alt=\"\" class=\"wp-image-136\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:481\/h:289\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-10.png 481w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:180\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/word-image-124-10.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><figcaption class=\"wp-element-caption\"><em><strong>Figure 10: Variance in R^2 values between 1970-2020<\/strong><\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>Range: 0.919514142-0.555478052<\/li>\n<\/ul>\n\n\n\n<p>There is little variance between R^2 values from 1970 to 2020, which indicates electricity consumption and temperature in every year follow a similar linear relationship.<\/p>\n\n\n\n<p>After calculation in P-values, coefficient of correlation and coefficient of determination, the datasets discover the temperature in Hong Kong has significant impact on the total electricity consumption in domestic, commercial, industrial. Furthermore the correlation is considered strong ,positive and linear. In short summary, total electricity consumption in domestic, commercial, industrial scales with the increasing in temperature.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Conclusion\"><\/span>4. Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In a nutshell, after the linear regression of the two factors (temperature and electricity consumption) is finished, the mean R-value of the temperature and electricity consumption from 1970 to 2020 is around 85% which means there is a strong positive relationship between temperature and electricity consumption. The mean r square value is 73% which means 73% of data follow the linear regression model. As a result, it proved our assumption that high temperature is approximately related to high electricity consumption in Hong Kong, and their correlation exists.<\/p>\n\n\n\n<p>In this project, our group also found tons of problems during processing the data, such as the data included noise that is not fully complete or not very consistent. It requires us to use the technique from lessons. We found that some methods like normalization are advantageous in this case. Apart from that, cleaning and processing data requires us to build a better flow first, taking more time than we thought. Without this project, our group may not have that much experience to try out the fun and hard of processing data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_References\"><\/span>5. References<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Observatory, H. K. (2021, April 20). Climate Change in Hong Kong &#8211; Temperature. \uff5cHong Kong Observatory(HKO)\uff5cClimate Change. <a href=\"https:\/\/www.hko.gov.hk\/en\/climate_change\/obs_hk_temp.htm\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.hko.gov.hk\/en\/climate_change\/obs_hk_temp.htm<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Appedix\"><\/span>6. Appedix<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">Full code:<\/span><\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport pandas as pd\nimport requests\nimport os\nimport time\nimport matplotlib.pyplot as plt\n\ndef fetch_data():\n    &quot;&quot;&quot;\n    Fetches temperature data for various stations from the Hong Kong Observatory API and saves it to a CSV file.\n    &quot;&quot;&quot;\n    ROOTDIR = &quot;\/content\/drive\/MyDrive\/SDSC2004_Project&quot;\n    DATADIR = os.path.join(ROOTDIR, &quot;dataset&quot;)\n    DATATYPE = &quot;CLMTEMP&quot;\n    STATIONS = &#x5B;&quot;SHA&quot;, &quot;SKG&quot;, &quot;SKW&quot;, &quot;SSH&quot;, &quot;SSP&quot;, &quot;STY&quot;, &quot;TC&quot;, &quot;TKL&quot;, &quot;TMS&quot;,\n                &quot;TPO&quot;, &quot;TU1&quot;, &quot;TW&quot;, &quot;TWN&quot;, &quot;TY1&quot;, &quot;TYW&quot;, &quot;VP1&quot;, &quot;WGL&quot;, &quot;WLP&quot;, &quot;WTS&quot;, &quot;YLP&quot;]\n    START_YEAR = 1970\n    END_YEAR = 2021\n    RFORMAT = &quot;json&quot;\n\n    errors = &#x5B;]\n    data = &#x5B;]\n\n    for station in STATIONS:\n        for year in range(START_YEAR, END_YEAR + 1):\n            time.sleep(5)\n            payload = {\n                'dataType': DATATYPE,\n                'rformat': RFORMAT,\n                'station': station,\n                'year': year\n            }\n\n            print(f'Getting data for station {station} in {year}')\n\n            url = f&quot;https:\/\/data.weather.gov.hk\/weatherAPI\/opendata\/opendata.php&quot;\n            res = requests.get(url, params=payload)\n\n            try:\n                res_data = res.json()\n                temps = res_data.get('data')\n                for temp in temps:\n                    temp.append(payload.get('station'))\n                    data.append(temp)\n\n            except ValueError as e:\n                error = f&quot;Missing: dataType = {payload.get('dataType')}, station = {payload.get('station')}, year = {payload.get('year')}&quot;\n                errors.append(error)\n\n    df_temp = pd.DataFrame(data, columns=&#x5B;'year', 'month', 'day', 'temp', 'unit', 'station'])\n    df_temp.to_csv('.\/dataset\/part2.csv', index=False)\n\n\ndef merge_csv(csv1, csv2):\n    &quot;&quot;&quot;\n    Merges two CSV files into one.\n    &quot;&quot;&quot;\n    part1 = pd.read_csv(csv1)\n    part2 = pd.read_csv(csv2)\n\n    full = pd.concat(&#x5B;part1, part2])\n    full.to_csv('.\/dataset\/temp.csv', index=False)\n\n\ndef normalize_data():\n    &quot;&quot;&quot;\n    Normalizes temperature data by averaging temperatures for each month.\n    &quot;&quot;&quot;\n    temp = pd.read_csv('.\/dataset\/temp.csv')\n\n    data = &#x5B;]\n    for year in range(1970, 2020 + 1):\n        for month in range(1, 12 + 1):\n            log = temp.loc&#x5B;(temp&#x5B;'year'] == year) &amp; (temp&#x5B;'month'] == month)].dropna()\n            data.append(&#x5B;year, month, pd.to_numeric(log&#x5B;'temp']).mean()])\n\n    df_temp = pd.DataFrame(data, columns=&#x5B;'year', 'month', 'average temp'])\n    df_temp.to_csv('.\/dataset\/temp_clean.csv', index=False)\n\n\ndef plot_energy_vs_temp_by_year():\n    &quot;&quot;&quot;\n    Plots energy consumption against average temperature for each year.\n    &quot;&quot;&quot;\n    temp = pd.read_csv('.\/dataset\/temp_clean.csv')\n    energy = pd.read_csv('.\/dataset\/electric.csv')\n\n    energy_domestic = energy&#x5B;&#x5B;'Year', 'Month', 'Domestic']]\n    df_combined = pd.merge(temp, energy_domestic)\n\n    for year in range(1970, 2021):\n        plt.clf()\n        df_filtered = df_combined&#x5B;(df_combined&#x5B;'Year'] == year)]\n        plt.scatter(df_filtered&#x5B;'average temp'], df_filtered&#x5B;'Domestic'], marker='x', c='red', linewidths=1)\n        plt.title(year)\n        plt.xlabel(&quot;Average Temperature (\u00b0C)&quot;)\n        plt.ylabel(&quot;Domestic Energy Consumption (kWh)&quot;)\n        plt.savefig(f'.\/graph\/{year}.png')\n\n\n# Example usage\nfetch_data()  # Fetch and save temperature data\nmerge_csv('.\/dataset\/part1.csv', '.\/dataset\/part2.csv')  # Merge two parts of the dataset\nnormalize_data()  # Normalize temperature data\nplot_energy_vs_temp_by_year()  # Plot energy consumption against temperature for each year\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>This is the group project of SDSC2004 &#8211; Data Visualization. I did the project in my year 1 2020\/21 Semester B. Presentation Slides: Course Instructor: Dr. Yu Yang 1. Introduction &hellip; <a href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis<\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":328,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,3],"tags":[11,13,15,14,12],"class_list":["post-124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-analysis","category-proj","tag-2020-21-semester-b","tag-data-science","tag-data-visualization","tag-sdsc2004","tag-year-1"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary\" \/>\n<meta property=\"og:description\" content=\"This is the group project of SDSC2004 &#8211; Data Visualization. I did the project in my year 1 2020\/21 Semester B. Presentation Slides: Course Instructor: Dr. Yu Yang 1. Introduction &hellip; Continue readingExploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis\" \/>\n<meta property=\"og:url\" content=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/\" \/>\n<meta property=\"og:site_name\" content=\"Philip\u2019s Data Science Diary\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-29T13:43:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-06T02:00:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philip\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philip\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/\"},\"author\":{\"name\":\"Philip\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"headline\":\"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis\",\"datePublished\":\"2021-04-29T13:43:00+00:00\",\"dateModified\":\"2024-03-06T02:00:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/\"},\"wordCount\":1068,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2021\\/04\\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png\",\"keywords\":[\"2020\\\/21 Semester B\",\"Data Science\",\"Data Visualization\",\"SDSC2004\",\"Year 1\"],\"articleSection\":[\"Data Analysis\",\"Projects\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/\",\"name\":\"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2021\\/04\\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png\",\"datePublished\":\"2021-04-29T13:43:00+00:00\",\"dateModified\":\"2024-03-06T02:00:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#primaryimage\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2021\\/04\\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2021\\/04\\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2021\\\/04\\\/29\\\/relationship-between-temperature-and-electricity-consumption\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\",\"name\":\"Philip\u2019s University Data Science Journey\",\"description\":\"Navigating Data Science: From Classroom to Career\",\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\",\"name\":\"Philip\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"width\":16,\"height\":16,\"caption\":\"Philip\"},\"logo\":{\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\"},\"description\":\"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.\",\"sameAs\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\"],\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/author\\\/philip\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/","og_locale":"en_GB","og_type":"article","og_title":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary","og_description":"This is the group project of SDSC2004 &#8211; Data Visualization. I did the project in my year 1 2020\/21 Semester B. Presentation Slides: Course Instructor: Dr. Yu Yang 1. Introduction &hellip; Continue readingExploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis","og_url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/","og_site_name":"Philip\u2019s Data Science Diary","article_published_time":"2021-04-29T13:43:00+00:00","article_modified_time":"2024-03-06T02:00:11+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png","type":"image\/png"}],"author":"Philip","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Philip","Estimated reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#article","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/"},"author":{"name":"Philip","@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"headline":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis","datePublished":"2021-04-29T13:43:00+00:00","dateModified":"2024-03-06T02:00:11+00:00","mainEntityOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/"},"wordCount":1068,"commentCount":0,"publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png","keywords":["2020\/21 Semester B","Data Science","Data Visualization","SDSC2004","Year 1"],"articleSection":["Data Analysis","Projects"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/","url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/","name":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis - Philip\u2019s Data Science Diary","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#website"},"primaryImageOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#primaryimage"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png","datePublished":"2021-04-29T13:43:00+00:00","dateModified":"2024-03-06T02:00:11+00:00","breadcrumb":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#primaryimage","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2021\/04\/Analyzing-Temperatures-Impact-on-Hong-Kongs-Electricity-Consumption.png","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2021\/04\/29\/relationship-between-temperature-and-electricity-consumption\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/philip.twinight.co\/portfolio\/"},{"@type":"ListItem","position":2,"name":"Exploring the Relationship Between Temperature and Electricity Consumption in Hong Kong Through Data Analysis"}]},{"@type":"WebSite","@id":"https:\/\/philip.twinight.co\/portfolio\/#website","url":"https:\/\/philip.twinight.co\/portfolio\/","name":"Philip\u2019s University Data Science Journey","description":"Navigating Data Science: From Classroom to Career","publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/philip.twinight.co\/portfolio\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414","name":"Philip","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","width":16,"height":16,"caption":"Philip"},"logo":{"@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png"},"description":"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.","sameAs":["https:\/\/philip.twinight.co\/portfolio"],"url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/author\/philip\/"}]}},"_links":{"self":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":23,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":344,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/124\/revisions\/344"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media\/328"}],"wp:attachment":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}