knitr::opts_chunk$set( collapse = TRUE, comment = "##", fig.path = "man/figures/README-", out.width = "100%", message = FALSE, warning = FALSE )
Freeze/Thaw Phenology Data of Global Lake and River Ice
The term phenology in the data set title refers to the seasonal phenomenon of the freezing and thawing of lake and river ice (also known as 'ice-in'/'ice-out' and 'ice-on'/'ice-off' data. Ice-out dates, or the dates of ice break-up, are the annual dates in spring when winter ice cover leaves an inland body of water. Methods are provides to enable convenient access to New England iceout data from the USGS and Minnesota iceout data from the MDNR along with extra Maine state data from MDACF and a comprehensive global dataset (to 2014) from the NSIDC.
The following functions are provided:
read_maine_iceout_data
: Read Maine Bureau of Parks & Lands State Ice-out Data for a Given Yearread_mdnr_metadata
: Retrieves metadata on all available Minnesota Lakes.read_minnesota_iceout_data
: Read Minnesota Department of Natural Resources State Ice-out Dataplot_iceout
: Plot a single iceout dataset (excluding data from nsidc_icout
)The following datasets are provided:
me_iceout
: Maine Bureau of Parks & Lands State Ice-out Datamn_iceout
: Minnesota Department of Natural Resources State Ice-out Datansidc_iceout
: NSIDC Global Lake and River Ice Phenology Database, Version 1usgs_iceout
: USGS Lake Ice-Out Data for New EnglandYou can install the development version of iceout
via:
devtools::install_github("hrbrmstr/iceout") # this fork # or devtools::install_github("BigelowLab/iceout") # the original
library(iceout) library(hrbrthemes) # devools install req library(tidyverse) # current version packageVersion("iceout")
(NOTE: the convience plotting function doesn't work with this dataset)
data(nsidc_iceout)
nsidc_iceout
The NSIDC data has quite a bit of global coverage:
maps::map("world", ".", exact = FALSE, plot = FALSE, fill = TRUE) %>% fortify() -> wrld ggplot() + ggalt::geom_cartogram( data = wrld, map = wrld, aes(long, lat, map_id=region), fill="#3B454A", color = "white", size = 0.125 ) + geom_point( data = distinct(nsidc_iceout, lakeorriver, longitude, latitude), aes(longitude, latitude, fill = lakeorriver), size = 1.5, color = "#2b2b2b", stroke = 0.125, shape = 21 ) + scale_fill_manual( name = NULL, values = c("L"="#fdbf6f", "R"="#1f78b4"), labels=c("L" = "Lake", "R" = "River") ) + ggalt::coord_proj("+proj=wintri", ylim = range(nsidc_iceout$latitude, na.rm = TRUE)) + ggthemes::theme_map() + theme(legend.position = c(0.375, 0.1))
Let's look at some US data:
filter(nsidc_iceout, country == "United States", state == "ME") %>% mutate(iceout_date = as.Date(sprintf("2020-%s-%s", iceoff_month, iceoff_day))) %>% # leap year for y axis plotting ggplot(aes(iceoff_year, iceout_date)) + geom_point(aes(color = lakecode), show.legend = FALSE, size = 0.25, alpha=1/4) + geom_smooth(aes(group = lakecode, color = lakecode), se = FALSE, size = 0.25, show.legend = FALSE) + labs( x = NULL, y = "Ice-out Day", title = "Historical Ice-out Dates for Maine", subtitle = "Source: Global Lake and River Ice Phenology Database, Version 1", caption = "Source link: https://nsidc.org/data/G01377" ) + theme_ft_rc(grid="XY")
filter(nsidc_iceout, country == "United States", state == "NY") %>% mutate(iceout_date = as.Date(sprintf("2020-%s-%s", iceoff_month, iceoff_day))) %>% # leap year for y axis plotting ggplot(aes(iceoff_year, iceout_date)) + geom_point(aes(color = lakecode), show.legend = FALSE, size = 0.25, alpha=1/4) + geom_smooth(aes(group = lakecode, color = lakecode), se = FALSE, size = 0.25, show.legend = FALSE) + labs( x = NULL, y = "Ice-out Day", title = "Historical Ice-out Dates for New York", subtitle = "Source: Global Lake and River Ice Phenology Database, Version 1", caption = "Source link: https://nsidc.org/data/G01377" ) + theme_ft_rc(grid="XY")
data(usgs_iceout)
usgs_iceout
data(me_iceout)
me_iceout
data(mn_iceout)
mn_iceout
USGS
plot_iceout("usgs", "New Hampshire", "First.Conn")
Maine-curated
plot_iceout("me", "Maine", "Long Pond", town = "Belgrade")
Minnesota-curated
plot_iceout("mn", "Minnesota", "Minnewaska")
Where are the USGS study lakes?
library(ggrepel) library(hrbrthemes) # requires github/hrbrmstr/hrbrthemes ?(for the dark theme) library(worldtilegrid) # requires github/hrbrmstr/worldtilegrid (for the theme cleaner) # get ME+NH+MASS map maps::map("state", ".", exact = FALSE, plot = FALSE, fill = TRUE) %>% fortify() %>% filter(region %in% c("maine", "new hampshire", "massachusetts")) %>% as_tibble() -> st ggplot() + geom_polygon( data = st, aes(long, lat, group=group), fill = ft_cols$slate, color = "white", size = 0.125 ) + geom_label_repel( data = distinct(usgs_iceout, state, body_name, lon, lat), aes(lon, lat, label=body_name), size=3 ) + coord_quickmap() + theme_ft_rc(grid="") + worldtilegrid::theme_enhance_wtg()
filter(usgs_iceout, body_name == "Rangeley") %>% pull(lat) %>% unique() %>% round(2) -> focused_lat filter(usgs_iceout, lat >= focused_lat) %>% mutate( dm = sprintf( "2020-%02s-%02s", # use a leap year lubridate::month(date), lubridate::day(date) ), dm = as.Date(dm) )%>% ggplot(aes(date, dm, group=body_name, color=body_name)) + geom_smooth(method = 'loess', size=0.25, se = FALSE) + geom_point(size=0.75, alpha=1/3) + labs( x = NULL, y = "Ice-out Month/Day", color = NULL, title = sprintf( "Ice-out Trends for lakes at latitude %s and higher", focused_lat ) ) + theme_ft_rc(grid="Y")
cloc::cloc_pkg_md()
Please note that the 'iceout' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.