Identification of a specific formula/statistics function
Good morning, I am asking you for a hand in identifying a formula that will allow me to calculate, within a Numbers file, the number of days with hot and cold waves. This file of mine is about the temperatures of some places and therefore there are so many statistical functions behind it. Among the many parameters that I calculate there is one that is the one that allows me to calculate the number of days with heat waves and cold waves; to realize this formula I had thought of counting every day with a temperature above 30°C, with the detail however, that, it must select only the days above 30° in a row though. (example, if on July 15th the maximum is 31°C, on July 16th it is 32°C and on July 17th it is 29 ̊C, then the function must return me a value of 0, since the heat wave lasted only two days, So too little to be considered a heat wave. Instead, if on July 15 the maximum is 31 ̊C, on July 16 it is 32°C and on July 17 of 34°C, then you must return me value 3). I want to apply the same principle to calculate the number of days with cold waves, but just change the temperature, which obviously is not 30°, but maybe I'll wear it that it must be -5°C). Thank you guys.
MacBook Air 13″, macOS 14.5