I have a dataset that is somehow similar to the following
df <- data.frame(x= seq.int(1,10,1), date = seq.Date(from = as_date("2020-01-01"),to =