We recently had a look at plotting air temperature data in R. Given the importance of sea ice for the global climate, we will have a look at this as well. There are several reasons why sea ice is important:
- Changing the albedo – Ice reflects much more of the incoming radiation, while the ocean absorbs more of the energy, heating the region. Melting the ice means replacing the cooling effect with a heating one.
- Ocean circulation – Altering the environment means changing salinity and density of the water, which will influence the circulation.
- Ecosystem – Losing ice means changing the habitat for the species living in the region.
With this in mind, we want to disturb this system as little as possible. So, how are we doing? Not great, it seems. NSIDC publishes ice cover data here. Most of it is published as spreadsheet files:

Well structured, but a bit hard to grasp. Lets, again, use R to plot climate data. The script:
# Set directory
setwd("C:/Eget/R")
# Load libraries
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
# Download spreadsheet
url <- "https://noaadata.apps.nsidc.org/NOAA/G02135/seaice_analysis/Sea_Ice_Index_Daily_Extent_G02135_v4.0.xlsx"
temp_file <- tempfile(fileext = ".xlsx")
download.file(url, temp_file, mode = "wb")
# Read header
headers <- read_excel(temp_file, sheet = 1, n_max = 1, col_names = FALSE)
# Read the rest
data_raw <- read_excel(temp_file, sheet = 1, skip = 1, col_names = FALSE)
# Column names
num_cols <- ncol(data_raw)
num_header_cols <- ncol(headers)
# Name of year - ALL columns are years in the header row, remove NAs
year_names_raw <- as.character(as.integer(headers[1, 1:min(num_header_cols, num_cols)]))
year_names <- year_names_raw[!is.na(year_names_raw)]
# Column names - first two columns in data_raw are month and day, the rest are years
col_names <- c("month", "day", year_names)
# Adjust if needed
if (length(col_names) > num_cols) {
col_names <- col_names[1:num_cols]
}
if (length(col_names) < num_cols) {
col_names <- c(col_names, paste0("extra_", 1:(num_cols - length(col_names))))
}
# Set column names
names(data_raw) <- col_names[1:num_cols]
# Columns with 4 digit years
year_cols <- col_names[3:length(col_names)]
year_cols <- year_cols[grepl("^[0-9]{4}$", year_cols)]
# Select data and create day of year - only for rows with actual day values
data <- data_raw %>%
select(month, day, all_of(year_cols)) %>%
filter(!is.na(day)) %>%
mutate(
day_of_year = row_number()
)
# Manually set 2025 values after day 293 to NA (since file only has data to day 293)
data <- data %>%
mutate(`2025` = ifelse(day_of_year > 293, NA, `2025`))
# Data format
data_long <- data %>%
pivot_longer(
cols = all_of(year_cols),
names_to = "year",
values_to = "extent"
) %>%
mutate(
year = as.integer(year)
) %>%
filter(!is.na(extent))
# Show first rows for control
print("First rows of data:")
print(head(data_long))
print(paste("Number of data points:", nrow(data_long)))
# Create plot
p <- ggplot(data_long, aes(x = day_of_year, y = extent, color = year, group = year)) +
geom_line(linewidth = 0.5, alpha = 0.6) +
geom_line(data = data_long %>% filter(year == 2025),
aes(x = day_of_year, y = extent),
color = "red", linewidth = 1.2, alpha = 1) +
scale_color_viridis_c(option = "plasma") +
labs(
title = "Daily Arctic Ice Extent (1978-2025)",
subtitle = "2025 in red (through October 19)",
x = "Day of year",
y = "Extent (million km²)",
color = "Year",
caption = "Source: NSIDC"
) +
theme_minimal() +
theme(
plot.title = element_text(size = 14, face = "bold"),
plot.subtitle = element_text(size = 11),
axis.title = element_text(size = 11),
legend.position = "right"
)
# Show plot
print(p)
# Save plot to file
ggsave("arctic_ice_extent.png", plot = p, width = 30, height = 15, units = "cm", dpi = 300)
print("Plot saved as 'arctic_ice_extent.png'")
# Clean up temporary file
unlink(temp_file)
The resulting plot:

This kind of plot is a great pick when you want to see the long term trend and still compare individual days and years. It’s quite clear that there is a downward trend. However, the plot doesn’t answer questions like where or why. There will be more posts on this, which will add the geographical dimension to the sea ice loss.