Description Usage Format Details Source References Examples
Global Annual Mean Surface Air Temperature Change
1 |
A data frame with three variables:
Source The source of data: (1) GISS Surface Temperature (GISTEMP) analysis and (2) the global component of Climate at a Glance (GCAG).
year The year of temperature measures.
month The month of temperature measures.
day The day of temperature measures.
temp Combined Land-Surface Air and Sea-Surface Water Temperature Anomalies (deviations from a corresponding period, see details)
For GISTEMP: Temperature Anomalies are deviations from 1951-1980 means (see https://data.giss.nasa.gov/gistemp)
For GCAG: Temperature Anomalies are deviations with respect to the 20th century average (see http://www.ncdc.noaa.gov/cag/data-info/global)
Data downloaded from https://datahub.io/core/global-temp#readme
GISTEMP: NASA Goddard Institute for Space Studies (GISS) Surface Temperature Analysis, Global Land-Ocean Temperature Index.
NOAA National Climatic Data Center (NCDC), global component of Climate at a Glance (GCAG).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #load packages
library(ggplot2)
library(ggplot2)
library(dplyr, warn.conflicts = F)
# Select source and average by year
df <-
warming %>%
dplyr::filter(source == "GISTEMP") %>%
dplyr::group_by(year) %>%
summarise(temp = mean(temp, na.rm = T))
# Plot trend in global temperature
ggplot(df, aes(y = temp, x = year, color = temp)) +
geom_hline(yintercept = 0,
lty = "dashed",
alpha = .8) +
geom_line(size = 1,
alpha = .5,
show.legend = F) +
geom_point(size = 2, show.legend = F) +
scale_color_gradient(low = "steelblue", high = "red") +
scale_x_continuous(breaks = seq(1880, 2020, 10)) +
scale_y_continuous(breaks = seq(-.5, 1, .25)) +
theme_bw(base_size = 12) +
theme(panel.grid = element_blank(),
title = element_text(size = 12)) +
ylab("Diferença de Temperatura (°C)") + xlab("Ano") +
labs(title = "Mudança Na Temperatura Média Global",
subtitle = "Diferença para o período entre 1950 e 1980",
caption = "Fonte: https://data.giss.nasa.gov/gistemp")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.