prov %>%
pivot_longer(
cols = starts_with("temp_"),
names_to = "month",
values_to = "temperature"
) %>%
mutate(
month = factor(
month,
levels = paste0(
"temp_",
c("jan","feb","mar","apr","may","jun",
"jul","aug","sep","oct","nov","dec")
)
)
) %>%
ggplot() +
geom_sf(aes(fill=temperature))+
facet_wrap(month~., nrow=2) +
scale_fill_gradient2(
low = "#2166AC",
mid = "#F7F7F7",
high = "#B2182B",
midpoint = 10,
na.value = "aliceblue",
name = "Temperature (°C)"
) +
theme_void() +
theme(
legend.position = "bottom"
)