Introduction

Climate.DF is a project created by data-oriented student Climatologists who seek to keep the world aware of how climate has changed from the past and how it is going to change in the future. We intend to do it using statistical methods, data visualization and machine learning models.

Importance of Climate Change

Understanding and predicting what the future weather might bring, or predicting how climate will change over the next few decades is of vital importance - both for our economy and for society. Climate can be thought of as the average or typical weather conditions we experience. Scientists know that climate varies naturally on many timescales and they know that people are affecting climate - particularly through emissions of greenhouse gases.

What do we wish to achieve?

We are focusing on different accurate and comprehendible visualizations and portraying how factors like temperature, carbon dioxide, and different natural gases disrupt climate patterns. Through regression modeling and time series analysis, we aim to forecast future patterns of climate and provide methods to control climate change using statistical methods. Our project showcases prehistoric climate changes in an interactive Shiny Application where the user can select a start and end data and view different temperature changes over the years. We are interested in showcasing different statistics to portray how climate has changed over different geographies. With respect to time-series analysis, we aim to do a global forecast of temperature to give our viewers an idea of the different global temperature changes and use ARIMA models to forecast future temperature changes. Using effective visualizations of maps, we aim to show how different anomalies like temperatures and precipitation change with different continents or countries.

The main goal of this project is to showcase the reasons for rise in temperatures and how the temperatures are rising across the world. There are two main datasets we will be focusing on, the first one is data collected from Berkeley Earth Temperature Data, and the second being a dataset from Kaggle which contains information about temperatures and greenhouse gases.

Part 1

Exploratory Data Analysis and Modeling of historical data from 1983-2008

In this part of the project, we will be analyzing how climate in the past has changed due to the effect of greenhouse gases.

We have successfully loaded our data and handled missing values.

In this dataset, all of the months are given in numbers from 1-10, so in order to increase clarity of the dataset, the numbers have been changed to months.


Data Exploration

Greenhouse gases are poisonous to our atmosphere and causes various changes to atmospheric temperatures. Through a bar chart, let’s explore how these greenhouse gases have caused a change in temperature in the past.

Note: Hover over the barplots to view interact with graph.

  • As we can see, over the years, the Carbon Dioxide (CO2) and Methane (CH4) levels started off very low, but as time proceeds, we can see the levels of these gases grow rapidly causing larger changes to average temperatures. These changes of CO2 and CH4 levels suggests advancements in industrial districts or factories around the world, which emit a lot of greenhouse gases.

  • As the CFCs increase, they cause damage to our stratospheric ozone layer hence allowing more UV rays to enter the Earth and increasing temperatures worldwide. CFCs are used primarily as a foaming agent for building insulation, refrigerators and other consumer products, and countries with mass industrial development such as China, USA, UK, India, and Japan are primary emmiters for this chemical.


On camparison, we would like to portray how temperature changes with important factors such as CO2, CH4, N2O, and MEI.


Now, we will focus on a small time series analysis to visualize how temperature, CO2, CH4, N20 and MEI have changed in the past, over time.

  1. Temperature

Through this time series visualization, we can observe that there is an upward trend in the increase in temperature from 1983-2008.

Using Holt-Winter’s statistical time series predictions, we can observe how the temperatures are bound to change in the forthcoming years.

  1. Carbon Dioxide (CO2)
  • Extra carbon dioxide in the atmosphere increases the greenhouse effect. Thermal energy is trapped by the atmosphere, causing the planet to become warmer than it would be naturally. This increase in the Earth’s temperature is called global warming.
  • From the graph it is clear that CO2 levels have been constantly increasing in atmosphere.

Using Holt-Winter’s statistical time series predictions, we can observe how the CO@ levels are bound to change in the forthcoming years. The increase in CO2 levels seem to be linearly increasing as time proceeds.

  1. Methane (CH4)
  • Methane bubbles are effect and cause of rise in temperature. Due to climate change, more methane is bubbling up from water bodies throughout the world. The release of methane, a potent greenhouse gas, leads to a further increase in temperature.
  • If methane leaks into the air before being used it absorbs the sun’s heat, warming the atmosphere. For this reason, it’s considered a greenhouse gas, like carbon dioxide.
  • From the graph, we can see that there has been an increase in methane over time.

Using Holt-Winter’s statistical time series predictions, we can observe how the CH4 are bound to change in the forthcoming years. The increase in CH4 levels seem to be following a logarithmic pattern as time proceeds. The more precautions we take, the lower we will find our CH4 levels over time and therefore, temperatures will in turn decrease.

  1. Nitrous Oxide (N2O)
  • Nitrous Oxide has shown a sharp increase over the years which is very harmful for the atmosphere, and it is more harmful than CO2 and CH4 on the global warming index, and we must prevent the expulsion of this gas.

Using Holt-Winter’s statistical time series predictions, we can observe how N2O levels are bound to change in the forthcoming years. The increase in N2O levels seem to be sharply increasing as time proceeds.

  1. Multivariate EI Nino Southern Oscillation Index (MEI)
  • There is a seasonality to MEI but not a continuous positive or negative trend over the years.

Over the years, there has been an increase in temperature, but there has been a slight decrease from 2005-2008. The average increase in temperatures is still greater after 2000.


Modeling

We will be constructing linear regression models to show how temperature is affected by many factors.

In this interactive plot, we can see our actual values plotted in blue, and our predicted values plotted in dark green. The predicted values lie on our regression lines, proving that these models aew very efficient, and that indeed, Temperature rises with increase in greenhouse gas emission levels.


Showcasing Monthly Temperature Changes Group by Year.

Animations of the Visualizations

We can observe that this animation showcases the change in temperature per month for every year included in our past data.


Part 2

In this part we will be changin our dataset to more recent Global Temperature data acquired from Berkeley Earth Temperature Data and the World Bank Climate Repository

Interactive Shiny Application for Temperature Changes from 1985-2015

The user may interact with this SHiny application to allow them to visualize changes in temperatures slelecting their own start and ending year. The user may select to visualize either just Land Temperature data or even the combined Land + Ocean temperature data. The user also has the option of viewing the best fit line through the line graph.

Please click on the link below to view the Shiny App:

Global Temperature Changes


Shiny Application of Temperature Changes Around the World

A Shiny Application has been created to visualize changes in temperature around the world. To visualize changes, please click on the link below to view the Shiny App:

Temperature Changes on a Map


Land Temperature Changes in the United States

Now, we will create a plot of the Average Temperature of the US from 1850 onwards.

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Looks like the average temperature has risen over time, from this plot.

Using an analysis of variance test, we can check if there are any differences in Average Temperature in the US.

Analysis of Variance Model
  Df Sum Sq Mean Sq F value Pr(>F)
Year 4 218.1 54.52 2.807 0.02637
Residuals 240 4662 19.43 NA NA
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Temp ~ Year, data = temp_usa3)
## 
## $Year
##                   diff        lwr      upr     p adj
## 1890-1850  0.415243197 -2.0323195 2.862806 0.9902477
## 1930-1850  0.607991497 -1.8395712 3.055554 0.9600409
## 1970-1850  0.420858844 -2.0267039 2.868422 0.9897377
## 2013-1850  2.666743197  0.2191805 5.114306 0.0250385
## 1930-1890  0.192748299 -2.2548144 2.640311 0.9995095
## 1970-1890  0.005615646 -2.4419471 2.453178 1.0000000
## 2013-1890  2.251500000 -0.1960627 4.699063 0.0877744
## 1970-1930 -0.187132653 -2.6346954 2.260430 0.9995637
## 2013-1930  2.058751701 -0.3888110 4.506314 0.1446209
## 2013-1970  2.245884354 -0.2016784 4.693447 0.0891290

The p-values highlight differences in the Average Temperatures at the 10% level between the years 1970 vs 2013, 1980vs 2013 and 1850 vs 2013. However, if the end year was chosen to 2010 or 2011 this effect is likely to disapear.

Finally, we will use a chloropeth map to display temperature changes by state in the US.

Naive Forecasting Forecating temperatures for the next 10 years.

## 
## Forecast method: Seasonal naive method
## 
## Model Information:
## Call: snaive(y = temp_ts, h = 120) 
## 
## Residual sd: 2.263 
## 
## Error measures:
##                   ME     RMSE      MAE       MPE     MAPE      MASE     ACF1
## Training set -0.0365 2.260541 1.741005 -6.470187 65.65101 0.9930965 0.332264
## 
## Forecasts:
##          Point Forecast      Lo 80     Hi 80        Lo 95     Hi 95
## Jan 2016          0.865 -2.0319992  3.761999  -3.56557798  5.295578
## Feb 2016          1.045 -1.8519992  3.941999  -3.38557798  5.475578
## Mar 2016          2.289 -0.6079992  5.185999  -2.14157798  6.719578
## Apr 2016          6.379  3.4820008  9.275999   1.94842202 10.809578
## May 2016          9.853  6.9560008 12.749999   5.42242202 14.283578
## Jun 2016         13.744 10.8470008 16.640999   9.31342202 18.174578
## Jul 2016         14.468 11.5710008 17.364999  10.03742202 18.898578
## Aug 2016         14.466 11.5690008 17.362999  10.03542202 18.896578
## Sep 2016         10.497  7.6000008 13.393999   6.06642202 14.927578
## Oct 2016          7.351  4.4540008 10.247999   2.92042202 11.781578
## Nov 2016          5.526  2.6290008  8.422999   1.09542202  9.956578
## Dec 2016          1.873 -1.0239992  4.769999  -2.55757798  6.303578
## Jan 2017          0.865 -3.2319756  4.961976  -5.40078347  7.130783
## Feb 2017          1.045 -3.0519756  5.141976  -5.22078347  7.310783
## Mar 2017          2.289 -1.8079756  6.385976  -3.97678347  8.554783
## Apr 2017          6.379  2.2820244 10.475976   0.11321653 12.644783
## May 2017          9.853  5.7560244 13.949976   3.58721653 16.118783
## Jun 2017         13.744  9.6470244 17.840976   7.47821653 20.009783
## Jul 2017         14.468 10.3710244 18.564976   8.20221653 20.733783
## Aug 2017         14.466 10.3690244 18.562976   8.20021653 20.731783
## Sep 2017         10.497  6.4000244 14.593976   4.23121653 16.762783
## Oct 2017          7.351  3.2540244 11.447976   1.08521653 13.616783
## Nov 2017          5.526  1.4290244  9.622976  -0.73978347 11.791783
## Dec 2017          1.873 -2.2239756  5.969976  -4.39278347  8.138783
## Jan 2018          0.865 -4.1527499  5.882750  -6.80898617  8.538986
## Feb 2018          1.045 -3.9727499  6.062750  -6.62898617  8.718986
## Mar 2018          2.289 -2.7287499  7.306750  -5.38498617  9.962986
## Apr 2018          6.379  1.3612501 11.396750  -1.29498617 14.052986
## May 2018          9.853  4.8352501 14.870750   2.17901383 17.526986
## Jun 2018         13.744  8.7262501 18.761750   6.07001383 21.417986
## Jul 2018         14.468  9.4502501 19.485750   6.79401383 22.141986
## Aug 2018         14.466  9.4482501 19.483750   6.79201383 22.139986
## Sep 2018         10.497  5.4792501 15.514750   2.82301383 18.170986
## Oct 2018          7.351  2.3332501 12.368750  -0.32298617 15.024986
## Nov 2018          5.526  0.5082501 10.543750  -2.14798617 13.199986
## Dec 2018          1.873 -3.1447499  6.890750  -5.80098617  9.546986
## Jan 2019          0.865 -4.9289985  6.658998  -7.99615596  9.726156
## Feb 2019          1.045 -4.7489985  6.838998  -7.81615596  9.906156
## Mar 2019          2.289 -3.5049985  8.082998  -6.57215596 11.150156
## Apr 2019          6.379  0.5850015 12.172998  -2.48215596 15.240156
## May 2019          9.853  4.0590015 15.646998   0.99184404 18.714156
## Jun 2019         13.744  7.9500015 19.537998   4.88284404 22.605156
## Jul 2019         14.468  8.6740015 20.261998   5.60684404 23.329156
## Aug 2019         14.466  8.6720015 20.259998   5.60484404 23.327156
## Sep 2019         10.497  4.7030015 16.290998   1.63584404 19.358156
## Oct 2019          7.351  1.5570015 13.144998  -1.51015596 16.212156
## Nov 2019          5.526 -0.2679985 11.319998  -3.33515596 14.387156
## Dec 2019          1.873 -3.9209985  7.666998  -6.98815596 10.734156
## Jan 2020          0.865 -5.6128872  7.342887  -9.04207354 10.772074
## Feb 2020          1.045 -5.4328872  7.522887  -8.86207354 10.952074
## Mar 2020          2.289 -4.1888872  8.766887  -7.61807354 12.196074
## Apr 2020          6.379 -0.0988872 12.856887  -3.52807354 16.286074
## May 2020          9.853  3.3751128 16.330887  -0.05407354 19.760074
## Jun 2020         13.744  7.2661128 20.221887   3.83692646 23.651074
## Jul 2020         14.468  7.9901128 20.945887   4.56092646 24.375074
## Aug 2020         14.466  7.9881128 20.943887   4.55892646 24.373074
## Sep 2020         10.497  4.0191128 16.974887   0.58992646 20.404074
## Oct 2020          7.351  0.8731128 13.828887  -2.55607354 17.258074
## Nov 2020          5.526 -0.9518872 12.003887  -4.38107354 15.433074
## Dec 2020          1.873 -4.6048872  8.350887  -8.03407354 11.780074
## Jan 2021          0.865 -6.2311699  7.961170  -9.98765532 11.717655
## Feb 2021          1.045 -6.0511699  8.141170  -9.80765532 11.897655
## Mar 2021          2.289 -4.8071699  9.385170  -8.56365532 13.141655
## Apr 2021          6.379 -0.7171699 13.475170  -4.47365532 17.231655
## May 2021          9.853  2.7568301 16.949170  -0.99965532 20.705655
## Jun 2021         13.744  6.6478301 20.840170   2.89134468 24.596655
## Jul 2021         14.468  7.3718301 21.564170   3.61534468 25.320655
## Aug 2021         14.466  7.3698301 21.562170   3.61334468 25.318655
## Sep 2021         10.497  3.4008301 17.593170  -0.35565532 21.349655
## Oct 2021          7.351  0.2548301 14.447170  -3.50165532 18.203655
## Nov 2021          5.526 -1.5701699 12.622170  -5.32665532 16.378655
## Dec 2021          1.873 -5.2231699  8.969170  -8.97965532 12.725655
## Jan 2022          0.865 -6.7997395  8.529740 -10.85720750 12.587208
## Feb 2022          1.045 -6.6197395  8.709740 -10.67720750 12.767208
## Mar 2022          2.289 -5.3757395  9.953740  -9.43320750 14.011208
## Apr 2022          6.379 -1.2857395 14.043740  -5.34320750 18.101208
## May 2022          9.853  2.1882605 17.517740  -1.86920750 21.575208
## Jun 2022         13.744  6.0792605 21.408740   2.02179250 25.466208
## Jul 2022         14.468  6.8032605 22.132740   2.74579250 26.190208
## Aug 2022         14.466  6.8012605 22.130740   2.74379250 26.188208
## Sep 2022         10.497  2.8322605 18.161740  -1.22520750 22.219208
## Oct 2022          7.351 -0.3137395 15.015740  -4.37120750 19.073208
## Nov 2022          5.526 -2.1387395 13.190740  -6.19620750 17.248208
## Dec 2022          1.873 -5.7917395  9.537740  -9.84920750 13.595208
## Jan 2023          0.865 -7.3289512  9.058951 -11.66656694 13.396567
## Feb 2023          1.045 -7.1489512  9.238951 -11.48656694 13.576567
## Mar 2023          2.289 -5.9049512 10.482951 -10.24256694 14.820567
## Apr 2023          6.379 -1.8149512 14.572951  -6.15256694 18.910567
## May 2023          9.853  1.6590488 18.046951  -2.67856694 22.384567
## Jun 2023         13.744  5.5500488 21.937951   1.21243306 26.275567
## Jul 2023         14.468  6.2740488 22.661951   1.93643306 26.999567
## Aug 2023         14.466  6.2720488 22.659951   1.93443306 26.997567
## Sep 2023         10.497  2.3030488 18.690951  -2.03456694 23.028567
## Oct 2023          7.351 -0.8429512 15.544951  -5.18056694 19.882567
## Nov 2023          5.526 -2.6679512 13.719951  -7.00556694 18.057567
## Dec 2023          1.873 -6.3209512 10.066951 -10.65856694 14.404567
## Jan 2024          0.865 -7.8259977  9.555998 -12.42673394 14.156734
## Feb 2024          1.045 -7.6459977  9.735998 -12.24673394 14.336734
## Mar 2024          2.289 -6.4019977 10.979998 -11.00273394 15.580734
## Apr 2024          6.379 -2.3119977 15.069998  -6.91273394 19.670734
## May 2024          9.853  1.1620023 18.543998  -3.43873394 23.144734
## Jun 2024         13.744  5.0530023 22.434998   0.45226606 27.035734
## Jul 2024         14.468  5.7770023 23.158998   1.17626606 27.759734
## Aug 2024         14.466  5.7750023 23.156998   1.17426606 27.757734
## Sep 2024         10.497  1.8060023 19.187998  -2.79473394 23.788734
## Oct 2024          7.351 -1.3399977 16.041998  -5.94073394 20.642734
## Nov 2024          5.526 -3.1649977 14.216998  -7.76573394 18.817734
## Dec 2024          1.873 -6.8179977 10.563998 -11.41873394 15.164734
## Jan 2025          0.865 -8.2961159 10.026116 -13.14571777 14.875718
## Feb 2025          1.045 -8.1161159 10.206116 -12.96571777 15.055718
## Mar 2025          2.289 -6.8721159 11.450116 -11.72171777 16.299718
## Apr 2025          6.379 -2.7821159 15.540116  -7.63171777 20.389718
## May 2025          9.853  0.6918841 19.014116  -4.15771777 23.863718
## Jun 2025         13.744  4.5828841 22.905116  -0.26671777 27.754718
## Jul 2025         14.468  5.3068841 23.629116   0.45728223 28.478718
## Aug 2025         14.466  5.3048841 23.627116   0.45528223 28.476718
## Sep 2025         10.497  1.3358841 19.658116  -3.51371777 24.507718
## Oct 2025          7.351 -1.8101159 16.512116  -6.65971777 21.361718
## Nov 2025          5.526 -3.6351159 14.687116  -8.48471777 19.536718
## Dec 2025          1.873 -7.2881159 11.034116 -12.13771777 15.883718

## 
##  Ljung-Box test
## 
## data:  Residuals from Seasonal naive method
## Q* = 224.13, df = 24, p-value < 2.2e-16
## 
## Model df: 0.   Total lags used: 24

On plotting our residuals, we can see that they are correlated. The residuals have a zero mean which shows that the forecast is unbiased. Hence, we have a good forecasting method in place.


ARIMA Models and Forecasting

## 
##  Ljung-Box test
## 
## data:  Residuals from ARIMA(3,0,0)(1,1,0)[12] with drift
## Q* = 73.508, df = 19, p-value = 2.379e-08
## 
## Model df: 5.   Total lags used: 24

We achieve a p-value less than 0.05 which fits our 95% threshold, and this shows that our model is efficient. Again, On plotting our residuals, we can see that they are correlated. The residuals have a zero mean which shows that the forecast is unbiased. Hence, the ARIMA model has a good predictive power.


Conclusion

We have written an indepth analysis on what the future of climate change looks like.

In Part 1, we analyzed and made decisions on what the future of the rises in temperature of this world would look like with the increase in greenhouse gases. We as citizens of the world have to do our best to promote a healthy environment and prevent global warming of our Earth. Using different visualizations we were able to showcase how climate change is real and is happening a rapid rate. We used Holt-Winters model to predict temperature changes given the current circumsances, using past/historic data.

In Part 2, we made different interactive applications to visiualize how temperatures have changed thorughout the world both in land temperatures, ocean temperatures, and have geographically represented our results with maps and graphs. We used more efficiecnt Time Series models such as Naive Forecasting and ARIMA models. We were able to predict rise in global temperatures across the world for the next 10 years.

We hope our analytics and results keep people aware of our ever changing world and how climate plays a big role in this change. If everyone takes care of their environment, we can get a cleaner and safer environment which could stop the hazardous effect of climate change on the ecosystem.