To answer this, we will likely need more information. First, a small sample dataset would help. See here for how to generate a minimal reproducible example (aka "reprex"). Second, we need to know your criteria for "rain was present" and "rain starts". Is the former "TotalRain > 0" and the latter "TotalRain > 0 this hour and 0 the previous hour", or something else?
1 Like