Assessing Climate Change and Global Temperature Trends Over Time
Final Project for IS 327: Concepts of Machine Learning at UIUC
Languages and Tools Used
The Analysis (Jupyter Notebook)
Purpose and Problem Description
The Climate Crisis is one of the most critical and urgent issues of our time. For most of history there has been a general lack in well-funded, proper climate change related research. Machine Learning approaches to global warming problems can provide more nuanced insights into climate patterns, complexities of global temperature trends, and help predict future climate scenarios.
Exploring the Berkeley Earth Global Temperatures Dataset
For this project, I analyzed a collection of global surface temperature data from Berkeley Earth (associated with the Lawrence Berkeley National Laboratory), an independent U.S. non-profit organization focused on environmental data science and analysis. Berkeley Earth provides a large range of temperature readings from around the year 1750 to 2015 that was split into datasets by country, state, major city, and land versus ocean temperatures in a packaged dataset on Kaggle. My primary focus was to analyze the LandAverageTemperature variable within the global, country-based, and major cities datasets.
Research Question:
What are the long-term trends in global surface temperatures and how do temperature patterns vary in different regions over time?
1. Exploratory Data Analysis and Preprocessing
- In order to analyze trends based on seasons and year, I removed NA values, converted dates to datetime data types, added ‘Year’ and ‘Month’ columns
- I split dataset into subsets to compare global trends versus US major city trends, and summer temperatures specifically
2. Linear Regression
- I trained the linear model on the training set for global average land temperatures in the summer
- implemented the same steps for major US cities to analyze the differences
3. K-Means Clustering
- performed clustering analysis on subset of average land temperatures during the summer in only major US cities – grouping regions with similar readings
- did the same for overall US temperatures and compared clusters
Results
with Interactive Visualizations
Summer Surface Temperatures Globally --
R-squared: 0.2656132923936281
Mean Squared Error (MSE): 0.24252933133205157
Root Mean Squared Error (RMSE): 0.49247267064483036
Summer Surface Temperatures for US Major Cities --
R-squared: 0.06748822904532015
Mean Squared Error (MSE): 1.5149053265391863
Root Mean Squared Error (RMSE): 1.230814903443725
The linear model for overall Global temperatures had higher accuracy.
US Major Cities --
Silhouette Score: 0.3669338556145997
US Overall --
Silhouette Score: 0.4357067013289608
The second clustering analysis of overall US temperatures had less chance of overlapping or ambiguity.
Conclusion
The linear model had a trade-off between explanatory power and predictive accuracy and it could be further improved by focusing on more specific variables or periods of time. Both the linear regression and clustering models were around the same level of accuracy and although there did seem to be an upward trend in temperatures, further improvement of the models is necessary.