10/20/2024

Introduction

Climate change has caused significant shifts in global sea levels. Sea level rise poses a risk to coastal cities, ecosystems, and global weather patterns. This presentation analyzes global sea level rise using statistical tools and forecasts future sea levels based on historical data.

Data Overview

The dataset used in this analysis consists of global sea level measurements over several decades. It contains two key columns:

  • year: The year when sea level was measured.
  • Sea Level: The global sea level measured in millimeters (mm).

We will use this data to visualize sea level changes over time and fit a simple regression model to understand the trend.

Visualizing Data (Part 1)

The plot below shows how global sea levels have changed over time. We can observe an increasing trend, indicating rising sea levels.

Visualizing Data (Part 2)

The bar chart shows the sea level changes in 10-year intervals to essentially get another perspective on the trend.

##Creating a Simple Linear Regression Model

To quantify the trend in sea levels, we fit a simple linear regression model. This model helps us understand the relationship between time (year) and the change in sea levels.

## 
## Call:
## lm(formula = mmfrom1993.2008average ~ year, data = sea_level)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.615 -10.317  -1.914   7.814  32.066 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -3.314e+03  5.202e+01  -63.70   <2e-16 ***
## year         1.657e+00  2.666e-02   62.18   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 13.16 on 141 degrees of freedom
## Multiple R-squared:  0.9648, Adjusted R-squared:  0.9646 
## F-statistic:  3866 on 1 and 141 DF,  p-value: < 2.2e-16

The model’s output shows a positive relationship between the year and sea level, indicating that sea levels are increasing over time.

Model Equation

The linear regression model fits a line to the data, which can be represented by the following equation:

\[ \hat{y} = \beta_0 + \beta_1 x \]

Where:

  • \(\hat{y}\) is the predicted sea level.
  • \(\beta_0\) is the intercept, representing the base sea level.
  • \(\beta_1\) is the slope, representing the rate of increase in sea level per year.

Confidence Intervals

If we were to predict future sea levels, we could calculate confidence intervals to estimate the range of possible future values.

The confidence interval for the predicted sea level is given by: \[ CI = \hat{y} \pm t^* \cdot SE(\hat{y}) \]

Where:

  • \(\hat{y}\) is the predicted response,
  • \(t^*\) is the critical value from the t-distribution, and
  • \(SE(\hat{y})\) is the standard error of the predicted response.

Using Plotly

The following plot shows an interactive 3D visualization of the sea level data. You can rotate and explore the plot for better insights into the trends over time.

R Code Example Used

ggplot(sea_level_future, aes(x = year, y = mmfrom1993.2008average)) + geom_line(color = “blue”) + geom_ribbon(aes(ymin = predicted_sea_level[,2], ymax = predicted_sea_level[,3]), alpha = 0.2) + labs(title = “Predicted Global Sea Level with Confidence Intervals”, x = “year”, y = “Sea Level (mm)”) + theme_minimal()

Conclusion

In conclusion, global sea levels have steadily increased over the past several decades, largely due to climate change. Understanding these trends is critical for predicting future risks to coastal communities and ecosystems.