Visualizing Climate Change’s Impact on Energy Demand for Cooling Buildings in Southeast Asia under Extreme Heat

Visualizing Climate Change’s Impact on Energy Demand for Cooling Buildings in Southeast Asia under Extreme Heat#

Project Overview

Design creative visualizations to unravel the impact of extreme heat and the associated energy demand in Southeast Asia using the latest climate model simulations.

Submission Guide

Deadline: Tuesday 11:59 pm, 3rd December 2024 (Note: Late submissions will not be accepted).

You must submit your project to Canvas. Please upload a Jupyter Notebook with the name “FinalProject_StudentID.ipynb”. You need to include your codes, figures, and the required write-ups in a single Jupyter Notebook file. Make sure to write down your student ID and full name in the cell below.

For any questions, feel free to contact Prof. Xiaogang HE (hexg@nus.edu.sg), Haoling CHEN (h.chen@u.nus.edu), or Meilian LI (limeilian@u.nus.edu).

### Fill your student ID and full name below.

# Student ID:
# Full name:

Data Description#

Each of you has been randomly assigned a city in Southeast Asia (see Figure below) according to your student ID. For this project, you only need to work on the city assigned to you. Simulated near-surface air temperature (tas, unit: K) from the latest climate models have been provided (available here, you can load the data directly without downloading using the example provided below). This data have been divided into two parts: historical (1850.01.01-2014.12.31) simulations (CityName_hist.csv) and future (2015.01.01-2099.12.31) projections (CityName_future.csv). Historical data contains 12 climate models and 60265 time steps. Future data contains 12 climate models and 31046 time steps in 2 climate scenarios (ssp245: sustainable development scenario; ssp585: fossil-fuel based development; check SSP details here).

../../_images/selected_city.png
# Run the following script to obtain the city assigned to you. 
# Note: You must use the assigned city for this project.

def getCityName(studentID):
    
    import json
    studentCity = json.load(open('../../assets/data/2024_FinalProject_Student_City.json'))
    
    if studentID not in studentCity.keys():
        raise ValueError('%s is not a correct student ID!'%studentID)
    else:
        return studentCity[studentID]

# Example: (please use your own ID)
studentID = 'A0000000B'  
cityName = getCityName(studentID)

print(cityName)
Ipoh

An example is provided on how to load the temperature data for historical (tas_hist) and future (tas_ssp245, tas_ssp585) simulations from the provided .csv files. For more details on data loading and preprocessing, please check the Pandas tutorial.

# Run the following script to obtain the data assigned to you. 
cityName = "Singapore"

def load_data(cityName):
    
    import pandas as pd
    url = "https://raw.githubusercontent.com/XiaogangHe/python-climate-visuals/master/assets/data/finalproject"
    hist_address = url + "/" + cityName + "_hist.csv"
    future_address = url + "/" + cityName + "_future.csv"
    
    # Refer to https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html
    # for more details about MultiIndex of DataFrame 
    hist = pd.read_csv(hist_address, header=[0,1], 
                       index_col=0, parse_dates=True)
    idx = pd.IndexSlice
    # huss_hist = hist.loc[:,idx["huss",:]].droplevel(level=0,axis=1)
    tas_hist = hist.loc[:,idx["tas",:]].droplevel(level=0,axis=1)
    
    future = pd.read_csv(future_address, header=[0,1,2], index_col=0, parse_dates=True)

    # huss_ssp245 = future.loc[:,idx["huss","ssp245",:]].droplevel(level=[0,1],axis=1)
    # huss_ssp585 = future.loc[:,idx["huss","ssp585",:]].droplevel(level=[0,1],axis=1)
    tas_ssp245 = future.loc[:,idx["tas","ssp245",:]].droplevel(level=[0,1],axis=1)
    tas_ssp585 = future.loc[:,idx["tas","ssp585",:]].droplevel(level=[0,1],axis=1)
    
    return tas_hist, tas_ssp245, tas_ssp585

tas_hist, tas_ssp245, tas_ssp585 = load_data(cityName)

Task 1 (20 marks)#

Create “warming” stripes to visualize historical (1950-2014) and future (2015-2099) warming trends. You can use the annual average temperature from 1850 to 1900 as the baseline to calculate annual temperature anomalies for the required periods (1950-2014 and 2015-2099).

Bonus: 10 masks

While you can create 24 (12 climate models × 2 climate scenarios) similar warming stripes for Task 1, we hope you could come up with some creative design (e.g., layout, chart types) to visualize all information with a minimum number of graphs.

# Your solutions go here.
# Use the + icon in the toolbar to add a cell.

Task 2 (40 marks)#

Visualize the changing risks of heat extremes based on the average simulations from multiple climate models. To do this, you need to:

  • Fit Generalized Extreme Value (GEV) distributions using the annual maximum daily temperature over different periods (e.g., 1850-1900 for pre-industrial baseline, 1950-2014 for the historical period, and 2015-2099 for future scenarios) and across different emission scenarios (ssp245 and ssp585), respectively. Demonstrate the performance of your fitness.

  • Visualize the shift in your fitted GEV distributions over different periods and scenarios. (Hint: You may use visualization tools such as Ridgeline plot)

  • Estimate and compare the return levels for the 1-in-100-year and 1-in-1000-year heat extreme events over different periods and scenarios. Annotate the return levels in the fitted distributions.

# Your solutions go here.
# Use the + icon in the toolbar to add a cell.

Task 3 (20 marks)#

Extreme heat events can increase air conditioning use and drive surges in electricity demand. Cooling Degree Days (CDD) provide a simple indicator of how temperature drives energy demand for building cooling. Using the daily air temperature time series for the city assigned to you, estimate the energy demand for building cooling. To do this, you need to:

  • Calculate the monthly CDD for future scenarios (see Appendix 1). Visualize and compare the distributions of CDD across different months and scenarios (SSP245 and SSP585).

  • Estimate the annual energy consumption using the empirical equation provided (see Appendix 2). Visualize the time series of annual energy consumption from the historical period (1950-2014) to the future scenarios (2015-2099).

  • Estimate the energy consumption of building cooling in the 1-in-100-year and 1-in-1000-year heat extreme events identified in Task 2. Compare it with the average of historical daily energy consumption. To what extent will extreme events increase energy consumption?

# Your solutions go here.
# Use the + icon in the toolbar to add a cell.

Short Write-ups (20 marks)#

  • What story are you trying to tell? (Hints: You could discuss major findings from your analysis, key takeaways, and possible implications.)

  • Why did you choose such a visual design and how does it facilitate effective communication? (Hint: you could provide some rationale in terms of your choice of chart types, use of color, size, etc.)

# Your write-ups go here.
# Use the + icon in the toolbar to add a cell.

Bonus: 20 masks

  • For both Task 1 and Task 3, design your visualizations to incorporate uncertainties from (1) climate models (which exist over the entire period from 1950-2099) and (2) climate scenarios (which only exist during 2015-2099).

  • Feel free to make your own design. You can utilize ChatGPT for better data storytelling, such as creating dashboards or animation.

Tips#

  • You can recycle your codes from HW1 and HW2.

  • Official IPCC visual style guide can be found here.

AI policies#

You are encouraged to use ChatGPT (or other AI tools) for coding, visualization design, and related tasks. However, AI should not be used for your short write-ups. All written content must be your own. If you use AI for coding or visualizations, proper citations must be provided where applicable.

Appendix#

  1. Cooling Degree Days (CDD) are a measure of how much (in degrees), and for how long (in days), outside air temperature was higher than a specific base. CDD can be calculated as:

\[\text{CDD} = \sum_{i=1}^{n} \max(T_i - T_b, 0)\]

where \(n\) is the number of days over a desired period, \(T_i\) is the daily average temperature (°C), and \(T_b\) is the base temperature (°C) (e.g., 18°C).

  1. The daily energy consumption (kWh) for building cooling (specifically for a building in a campus) can be estimated by the following empirical equation:

\[ \text{Energy Consumption} = 1677.5 \times \text{CDD} + 14605 \]