cor(df$duration, df$tre200m0, use ="complete.obs")
[1] 0.194294
So, the correlation between Boeoegg explosion duration and average summer temperature is positive but extremely weak (r = 0.19), offering no real predictive value for summer heat.
col <-c("Normal summer"="#4A4A4A","Record-hot summer"="#D8432D")
Code
font_add_google("Open Sans", "opensans")showtext_auto()title <-"Can the exploding Boeoegg of Zurich predict the summer season?"subtitle <-glue("Folklore has that the faster the snowman effigy blast the warmer the summer but hard data \nshows a very weak correlation (r = 0.19), offering no predictive value")
Code
base_theme <-function(base_size =14, base_family ="opensans") {theme_minimal(base_size = base_size, base_family = base_family) +theme(# Backgroundspanel.background =element_rect(fill ="grey98", color =NA),plot.background =element_rect(fill ="white", color =NA),# Gridlines (Nature uses strong horizontal gridlines)panel.grid.major =element_line(color ="grey85", linewidth =0.6),panel.grid.minor =element_blank(),# Axesaxis.title =element_text(size = base_size *1.1, face ="bold"),axis.text =element_text(size = base_size *0.9, color ="grey20"),# Titlesplot.title =element_text(size = base_size *1.4, face ="bold"),plot.subtitle =element_text(size = base_size *1.05, color ="grey30"),# Legendlegend.position =c(0.02, 0.98),legend.justification =c("left", "top"),legend.background =element_rect(fill =alpha("white", 0.8), color =NA),legend.title =element_blank(),# Marginsplot.margin =margin(t =15, r =20, b =15, l =20) )}