Análisis de las Temperaturas Globales (1880–2023)

Author

Michael Newton Cutipa Santi

Published

April 1, 2025

1. Introducción

El cambio climático es uno de los principales desafíos del siglo XXI.
Una de las evidencias más claras es el aumento sostenido de la temperatura promedio global.
Este informe analiza datos reales de la NASA desde 1880 hasta 2023.


2. Carga y limpieza de los datos

library(tidyverse)

# URL con datos reales (usar comillas rectas)
url <- "https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv"

# Leer el CSV (saltando encabezados adicionales)
temp_raw <- read_csv(url, skip = 1)

2.1 Procesamiento de datos

# Renombrar y filtrar columnas
temp_df <- temp_raw %>%
  rename(Año = Year, Temp = `J-D`) %>%
  select(Año, Temp) %>%
  filter(!is.na(Temp))

# Asegurar tipo numérico
temp_df$Temp <- as.numeric(temp_df$Temp)

# Ver primeras filas limpias
head(temp_df)
# A tibble: 6 × 2
    Año  Temp
  <dbl> <dbl>
1  1880 -0.18
2  1881 -0.1 
3  1882 -0.12
4  1883 -0.18
5  1884 -0.29
6  1885 -0.34
  1. Visualización de la temperatura global
library(tidyverse)

# URL con datos reales (usar comillas rectas)
url <- "https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv"

# Leer el CSV (saltando encabezados adicionales)
temp_raw <- read_csv(url, skip = 1)

3.1 Línea de tendencia

ggplot(temp_df, aes(x = Año, y = Temp)) +
  geom_line(color = "steelblue", linewidth = 1) +
  geom_smooth(method = "lm", color = "red", se = FALSE) +
  labs(title = "Tendencia de Temperatura Global (1880–2023)",
       x = "Año", y = "°C respecto al promedio 1951–1980") +
  theme_minimal()
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_line()`).

3.2 Gráfico de dispersión con regresión

ggplot(temp_df, aes(x = Año, y = Temp)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "Dispersión de Temperatura Global y Regresión Lineal",
       x = "Año", y = "Temperatura (°C)") +
  theme_minimal()
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

3.3 Promedio por década

temp_df$Decada <- floor(temp_df$Año / 10) * 10

promedio_decada <- temp_df %>%
  group_by(Decada) %>%
  summarise(Promedio = mean(Temp))

ggplot(promedio_decada, aes(x = Decada, y = Promedio)) +
  geom_col(fill = "darkgreen") +
  labs(title = "Promedio de Temperatura Global por Década",
       x = "Década", y = "°C sobre promedio base") +
  theme_minimal()
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_col()`).

  1. Análisis estadístico
modelo <- lm(Temp ~ Año, data = temp_df)
summary(modelo)

Call:
lm(formula = Temp ~ Año, data = temp_df)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.37205 -0.13488 -0.04039  0.12859  0.61664 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.591e+01  7.371e-01  -21.59   <2e-16 ***
Año          8.188e-03  3.775e-04   21.69   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1903 on 143 degrees of freedom
  (1 observation deleted due to missingness)
Multiple R-squared:  0.7669,    Adjusted R-squared:  0.7653 
F-statistic: 470.5 on 1 and 143 DF,  p-value: < 2.2e-16

4.2 Aumento de temperatura entre 1880 y 2023

inicio <- temp_df %>% filter(Año == 1880) %>% pull(Temp)
final <- temp_df %>% filter(Año == 2023) %>% pull(Temp)
incremento <- round(final - inicio, 2)
incremento
[1] 1.35
  1. Conclusiones La temperatura global ha aumentado de manera significativa desde 1880.

El modelo lineal indica una tendencia de calentamiento clara y estadísticamente significativa.

Este análisis respalda la evidencia científica del cambio climático.

  1. Referencias NASA GISS. (2024). Global Surface Temperature Data. https://data.giss.nasa.gov/gistemp/