warming: Global warming

Description Usage Format Details Source References Examples

Description

Global Annual Mean Surface Air Temperature Change

Usage

1

Format

A data frame with three variables:

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)

Source

Data downloaded from https://datahub.io/core/global-temp#readme

References

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).

Examples

 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")

paternogbc/examples documentation built on June 24, 2019, 12:38 a.m.