I'm looking for the coldest hour for each day. My data looks like this:
(2015/12/27,12AM,32.0) (2015/12/27,12PM,34.0) (2015/12/28,10AM,26.1) (2015/12/28,10PM,28.0) (2015/12/28,11AM,27.0) (2015/12/28,11PM,28.9) (2015/12/28,12AM,25.0) (2015/12/28,12PM,26.100000000000005) (2015/12/29,10AM,22.45) (2015/12/29,10PM,26.1) (2015/12/29,11AM,24.1) (2015/12/29,11PM,25.0) (2015/12/29,12AM,28.9)
I grouped on each day to find the Min Temp with this code:
minTemps = FOREACH gdate2 GENERATE group as day,MIN(removeDash.temp) as minTemp;
which gives this output:
(2015/12/18,17.1) (2015/12/19,12.9) (2015/12/20,23.0) (2015/12/21,32.0) (2015/12/22,30.899999999999995) (2015/12/23,36.05) (2015/12/24,30.45) (2015/12/25,26.55) (2015/12/26,28.899999999999995) (2015/12/27,26.1) (2015/12/28,23.55) (2015/12/29,21.0)
My problem:I also need the hour at which the minimum temp occurred. How can I get the hour as well?