The Royal Netherlands Meteorological Institute has weather information by day for a number of Dutch stations. In this post I want to use those data for a practical problem: when should I switch to winter tires? (or is that snow tires? In any case nails or metal studs are forbidden in Netherlands). Netherlands does not have laws prescribing winter tires, it does not get bad enough, though there are some regulations in neighboring countries, which is of relevance for people driving to winter sports. For others, it is up to themselves.
Data are acquired from KNMI. They have various sets of data, this page has a selection form which leads to the data used today. The data comes with a header explaining details, unfortunately in Dutch. Of relevance for this post are TG and TN, average and minimum temperature in 0.1 C. Station used is de Bilt, where they got most data.
It seems under 7 C there is advantage to using winter tires. Temperature varies within the day, but in general the coldest part should be just before dawn which is morning rush hour. Warmest part around noon, with evening rush hour already cooling down. Based on this I decided that days with an average temperature of 7 C or less, or a minimum temperature of 0 C or less benefit from winter tires. In addition I chose the period 1980 to 2013.
It seems October is way too early to switch. Second half of November is an appropriate time.
# data prepared without text heading
r1 <- read.csv('KNMI_20141115.edited.txt')
Sys.setlocale(category = “LC_TIME”, locale = “C”) # Not NL months
r2 <- mutate(r1,
date = as.Date(format(YYYYMMDD),’%Y%m%d’),
# days number 1 to 365, using numbers from 1901
days <- filter(r2,yearn==1901) %>%
mutate(.,dayno=format(date,’%j’) ) %>%
# select correct years and Months, remove leap day to sync day numbers
# and flag selected days
r3 <- merge(r2,days,all=TRUE) %>%
filter(.,yearn>1980 & yearn<2014 & month %in% c('Oct','Nov','Dec')) %>%
mutate(.,wt = TN<0 | TG<70 ) %>%
# count the days
r4 <- as.data.frame(xtabs(wt ~ dayno,data=r3)/length(unique(r3$yearn)))
r4$daynon <- as.numeric(as.character(r4$dayno))
mylegend <- select(r3,day,month,daynon,dayno) %>%
filter(.,day ==’ 1′)
g1 <- ggplot(r4,aes(x=daynon,y=Freq))
g1 + geom_smooth() +