CMPSC-132 – Programming and Computation II: Data Structures…

CMPSC-132 – Programming and Computation II: Data Structures
PROJECT-1: Global Temperature Analysis
Name:
Introduction:
The change in temperature over the past 150 years is used by climate scientists as evidence to show that humans might have an increasingly devastating effect on the Earth's environment. Advances in computer modeling are allowing for climatologists to tease out both the causes and impacts of increasing Earth temperatures. In this recent Star Tribune article, researchers ran computer simulations that compared natural weather fluctuations for today's CO2 and greenhouse gas levels to pre-Industrial Revolution levels.
Although thinking about climate change can sometimes be daunting, it is an issue that is increasingly important to understand culturally and scientifically. You have probably seen many graphs showing the temperature over x number of years, but have you ever had the chance to examine the data yourself? In this activity, you are provided with a data set of monthly average global temperatures worldwide from January 1881 to December 2017. The goals of this project are to allow you to work with meaningful climate change data so as to draw your own conclusions and become better acquainted with Python data structures and some useful functions. Learning these skills to analyze the change in temperature over the past 137 years are extremely useful, and temperature is just the "tip of the iceberg" when it comes to computer modeling of weather-related data.
Note: For each exercise, paste codes or a screenshot of codes and results
Startup python codes:
import requests
import matplotlib.pyplot as plt
link = "https://data.giss.nasa.gov/gistemp/tabledata_v3/GLB.Ts+dSST.txt"
f = requests.get(link)
data =f.text
lines=data.split('n')
'''for more about plots, visit https://matplotlib.org/users/pyplot_tutorial.html'''
**Exercise 1**
Convert the data from scaled change in Celsius to absolute temperature in Fahrenheit. What is the mean temperature in Fahrenheit over the entire data set? Confirm that your result is reasonable.
# Your codes and results screenshots
**Exercise 2**
Find the mean average temperature of each month, as well as the lowest and highest average temperatures for each month. This is easiest if you create new list or dictionary that have all January temperatures, all February temperatures, and so on. When did the lowest and highest occur for each month? Are the highest temperatures generally more recent than the lowest temperatures?
# Your codes and results screenshots, and analysis
**Exercise 3**
For the rest of the project, it will be helpful to define two functions. Define one function that takes the month and year as input and outputs the index for that given month and year. Define another function that takes the index as the input and outputs the month and year.
# Your codes
**Exercise 4**
Create plots of the monthly average temperature over time for each month: one plot for all January average temperatures, one plot for all February average temperatures, etc. The plots should have Years on the horizontal (x) axis, and Temperature on the vertical (y) axis. The previously defined functions will be helpful here. Your code should plot all months (separately).
# Your codes and results screenshots
**Exercise 5**
Create a plot that shows the average annual temperature over all years. (That is, create one plot where each data point corresponds to the average temperature for a year.) (HINT: This is easiest if you create a new list with elements representing average temperature).
# Your codes and results screenshots
****************************************Read Me*****************************************
Technical information on GISTEMP data (about the data given to you)
GLOBAL Land-Ocean Temperature Index in 0.01 degrees Celsius base period: 1951-1980
sources: GHCN-v3 1880-01/2014 + SST: ERSST 1880-01/2014
using elimination of outliers and homogeneity adjustment
Notes: 1950 DJF = Dec 1949 – Feb 1950 ; ***** = missing
Divide by 100 to get changes in degrees Celsius (deg-C).
Multiply that result by 1.8(=9/5) to get changes in degrees Fahrenheit (deg-F).
Best estimate for absolute global mean for 1951-1980 is 14.0 deg-C or 57.2 deg-F,
so add that to the temperature change if you want to use an absolute scale
(this note applies to global annual means only, J-D and D-N !)
Example —
Lets take a Table Value : 40 i.e. from the data you have loaded
change : 0.40 deg-C or 0.72 deg-F (Divide by 100 to get changes in degrees Celsius (deg-C))
abs. scale if global annual mean: 14.40 deg-C or 57.92 deg-F (i.e. change+absolute global mean)
Try to incorporate this data (i.e. absolute Fahrenheit data) as asked in exercise-1 to get a real feel about the global temperature.
Project-1 data have been gathered from
http://data.giss.nasa.gov/gistemp/tabledata_v3/GLB.Ts+dSST.txt
Go through this document to have a better understanding of the data:
http://data.giss.nasa.gov/gistemp/faq/

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now