library(dplyr)
library(lubridate)
library(ggplot2)
data(arctic_2019)
# Create day in the year column to replace Month and Day
north <-
arctic_2019 %>%
mutate(yday = yday(make_date(Year, Month, Day)),
.keep = "all") %>%
select(Year, yday, Extent)
ggplot(north) +
geom_linerange(aes(x = yday, ymin = Year - 0.2, ymax = Year + 0.2),
size = 0.5, color = "red") +
scale_y_continuous(breaks = seq(1980, 2020, by = 5),
minor_breaks = NULL) +
labs(x = "Day",
y = "Year",
title = "Measurement frequencies were not always the same")
Run the code above in your browser using DataLab