Skip to content

Instantly share code, notes, and snippets.

@dreidpath
Created December 13, 2017 13:24
Show Gist options
  • Save dreidpath/c4b3fbc41d33e402e9e805efa3dccb91 to your computer and use it in GitHub Desktop.
Save dreidpath/c4b3fbc41d33e402e9e805efa3dccb91 to your computer and use it in GitHub Desktop.
A replotting of the recently published NOAA data from the Arctic Report Card 2017
temp area year
9.4693 1.42096 1979
-4.96053 1.45932 1980
-0.539474 1.55808 1981
-10.1184 1.59164 1982
1.27193 1.64151 1983
-8 1.46411 1984
2.77632 1.58685 1985
0.350877 1.43055 1986
-5.39035 1.54466 1987
-13.5877 1.62808 1988
-12.5746 1.52452 1989
-6.80263 1.45932 1990
-7.9386 1.36247 1991
-1.12281 1.49767 1992
5.17105 1.35288 1993
-8.52193 1.62712 1994
3.97368 1.31356 1995
9.31579 1.31164 1996
11.0658 1.21671 1997
14.9956 1.18315 1998
-0.385965 1.57342 1999
0.381579 1.55137 2000
0.903509 1.63192 2001
6.64474 1.36151 2002
2.80702 1.27041 2003
2.31579 1.38356 2004
-1.12281 1.40658 2005
6 1.25219 2006
13.9518 1.11123 2007
3.91228 1.43438 2008
0.535088 1.34712 2009
10.7588 1.2637 2010
0.0131579 1.3174 2011
5.84649 1.41233 2012
7.7193 1.34712 2013
9.89912 1.21959 2014
2.96053 1.32986 2015
13.4912 1.11315 2016
17.2982 1.01918 2017
# These data appeared in a graph on climate.gov: http://bit.ly/2AFNBJz.
# Paraphrasing from the website:
# The data are for each November since 1979 to 2017.
# The variable 'area' represents the combined November sea ice
# area for the Chukchi and Beaufort Seas, the two sub-basins of
# the Arctic Ocean that touch Alaska’s Arctic (northern) coast.
# Larger values means more sea ice in the combined basin in square kilometres.
# The variable 'temp' is the November temperature (Fahrenheit) at Utqiaġvik,
# also known as Barrow (71°17′26″N 156°47′19″W).
# The data were digitised using Plot Digitizer
# (https://sourceforge.net/projects/plotdigitizer). The variable 'years' was added
# manually later.
# Read the sea ice data in
SeaIce <- readr::read_csv("Desktop/SeaIce.csv")
library(ggplot2)
library(magrittr)
# A plot of the temperature on Barrow over the years. The area of sea ice is
# included as a colour (and size) gradient of each point.
# A loess curve is added first.
p <- SeaIce %>%
ggplot(aes(year, temp)) +
geom_smooth(method = 'lm') +
geom_point(aes(size = area, color = area)) +
scale_colour_gradient(low = "Red", high = "Blue",
space = "Lab", na.value = "grey50", guide = "colourbar",
name = bquote('Sea ice\n(Millions km'^2*")")) +
scale_radius(breaks = 7) +
xlab("Year") +
ylab("Temperature difference")
ggsave(file="yearXtemp.svg", plot=p, width=5, height=4)
# A plot of the area of sea ice over the years. The temperature difference is
# included as a colour gradient of each point. A loess curve is added first.
p <- SeaIce %>%
ggplot(aes(year, area)) +
geom_smooth(method = 'loess') +
geom_point(aes(color = temp)) +
scale_colour_gradient(low = "Blue", high = "Red",
space = "Lab", na.value = "grey50", guide = "colourbar",
name = "Temperature") +
xlab("Year") +
ylab(bquote('Sea ice (Millions km'^2*")"))
ggsave(file="yearXarea.svg", plot=p, width=5, height=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment