-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50af928
commit b18ab2b
Showing
3 changed files
with
67 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,12 +34,12 @@ | |
"source": [ | ||
"```{admonition} Submission Guide\n", | ||
"\n", | ||
"Deadline: **Sunday 11:59 pm, 19th November 2023** \n", | ||
"Deadline: **Sunday 11:59 pm, 17th November 2024** \n", | ||
"(Note: Late submissions will not be accepted). \n", | ||
"\n", | ||
"Please upload your solutions to [Canvas](https://canvas.nus.edu.sg/courses/47849/assignments) in a Jupyter Notebook format with the name \"Homework2_StudentID.ipynb\". Make sure to write down your student ID and full name in the cell below. \n", | ||
"Please upload your solutions to [Canvas](https://canvas.nus.edu.sg/courses/61921/assignments) in a Jupyter Notebook format with the name \"Homework2_StudentID.ipynb\". Make sure to write down your student ID and full name in the cell below. \n", | ||
"\n", | ||
"For any questions, feel free to contact Prof. Xiaogang HE ([[email protected]](mailto:[email protected])), or Zhixiao NIU ([niu.zhixiao@u.nus.edu](mailto:niu.zhixiao@u.nus.edu)).\n", | ||
"For any questions, feel free to contact Prof. Xiaogang HE ([[email protected]](mailto:[email protected])), Haoling CHEN ([h.chen@u.nus.edu](mailto:[email protected])) or Meilian LI ([[email protected]](mailto:limeilian@u.nus.edu)).\n", | ||
"\n", | ||
"```" | ||
] | ||
|
@@ -82,13 +82,26 @@ | |
"source": [ | ||
"## Task 1: Visualize the GEV distribution (30 marks)\n", | ||
"To visualize the GEV distribution, you can:\n", | ||
"1. Fit the Generalized Extreme Value (GEV) distribution to annual maximum daily temperature data and estimate the GEV parameters using the **Maximum Likelihood method**.\n", | ||
"2. Plot the probability density function (PDF) curve to to represent the distribution directly.\n", | ||
"3. Calculate the return level for a 20-year event and mark it on the plot.\n", | ||
"4. Fill the figure with different colors regarding the calculated return level as the dividing line.\n", | ||
"1. Fit the Generalized Extreme Value (GEV) distribution to annual maximum daily temperature data and estimate the GEV parameters using the **L-Moments method**.\n", | ||
"2. Plot the probability density function (PDF) curve to represent the distribution directly.\n", | ||
"3. Calculate the return level for a 10-year event and mark it on the plot.\n", | ||
"4. Shade the plot with different colors to distinguish areas above and below the calculated return level.\n", | ||
"5. Ensure that the necessary non-data elements are included, such as title, x/y axis labels, legend, etc. (you can check the [Matplotlib tutorial](https://xiaoganghe.github.io/python-climate-visuals/chapters/data-visuals/matplotlib-basic.html) for details)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8f7a646f", | ||
"metadata": {}, | ||
"source": [ | ||
"```{admonition} Bonus: 10 marks\n", | ||
":class: tip\n", | ||
"\n", | ||
"Illustrate how return levels vary across different return periods (e.g., 2, 5, 10, 20, 50, 100 years) using interactive sliders or dashboards. Resources such as the [Plotly documentation](https://plotly.com/python/sliders/) and [this tutorial video](https://www.youtube.com/watch?v=gs4d0_AKQi8) may be helpful for this task.\n", | ||
"\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
|
@@ -105,12 +118,12 @@ | |
"id": "67c41c3b", | ||
"metadata": {}, | ||
"source": [ | ||
"## Task 2: Visualize the trend of temperature anomaly ( 70 marks )\n", | ||
"## Task 2: Visualize the trend of temperature anomaly (70 marks)\n", | ||
"### Q1: Visualize the time series and trend of historical temperature anomalies of Singapore (35 marks)\n", | ||
"- Calculate the annual mean temperature from the daily data. This will result in a data set of 39 values — one per year. (5 marks)\n", | ||
"- Calculate the annual temperature anomalies using the first 15-year period as the baseline. (Hint: the anomalies is calculated by substracting the mean temperature over year 1982 to 1996 from the yearly mean temperature.) (5 marks)\n", | ||
"- Make a line graph of these annual temperature anomalies and make sure that the necessary non-data elements are included. (10 marks)\n", | ||
"- Based on the annual temperature anomalies above, visualize the trend using a 10-year moving window. (15 marks)" | ||
"- Calculate the annual mean temperature from the daily data. This will result in a dataset of 39 values — one per year. (5 marks)\n", | ||
"- Calculate the annual temperature anomalies using the first 10-year period as the baseline. (Hint: subtract the mean temperature over 1982 to 1991 from the annual mean temperature for each year.) (5 marks)\n", | ||
"- Visualize the change in these annual temperature anomalies over time, ensuring that you include essential non-data elements. (10 marks)\n", | ||
"- Visualize the trend of the annual temperature anomalies using a 5-year moving window. (15 marks)" | ||
] | ||
}, | ||
{ | ||
|
@@ -143,8 +156,8 @@ | |
"- Use your generated climate stripes as the background and then overlay the time series and the trend of annual anomalies (from Q1) on top of the climate stripes. (15 marks)\n", | ||
"\n", | ||
"Tips: \n", | ||
"- You can refer to [this GitHub repository](https://github.com/josephshea/ClimateStripes/blob/master/ClimateStripes-Canada.ipynb) to make the climate stripes. \n", | ||
"- To make a pretty and accessible (colorblind safe) chart, you might want to fine tune the aesthetics (e.g., color palette of the diverging colorbar) of your chart. " | ||
"- Refer to [this GitHub repository](https://github.com/josephshea/ClimateStripes/blob/master/ClimateStripes-Canada.ipynb) for guidance on creating climate stripes.\n", | ||
"- Fine-tune the aesthetics of your chart (e.g., color palette of the diverging colorbar) to ensure it is visually appealing and accessible (colorblind safe)." | ||
] | ||
}, | ||
{ | ||
|
@@ -161,11 +174,24 @@ | |
"# Your solutions go here.\n", | ||
"# Use the + icon in the toolbar to add a cell." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "14d1fb06", | ||
"metadata": {}, | ||
"source": [ | ||
"```{admonition} Bonus: 10 marks\n", | ||
":class: tip\n", | ||
"\n", | ||
"Create an interactive plot where users can hover over climate stripes and trend lines to view detailed information. For inspiration, you can refer to [this example](https://ourworldindata.org/un-population-2024-revision).\n", | ||
"\n", | ||
"```" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"display_name": "PytorchCPU", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
|
@@ -179,7 +205,7 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.6" | ||
"version": "3.8.13" | ||
}, | ||
"toc": { | ||
"base_numbering": 1, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.