Grouping statistics

From the text file temperature.txt, get the Fahrenheit average temperature data of a certain place. Compute the average temperatures of each quarter and the whole year.

Solution:

A
1
=file@s("temperature.txt").import@t()
2
=A1.derive(int((Month+2)/3):Quarter)
3
=A2.group(Quarter)
4
=A3.new(Quarter,round(~.avg(Temperature),2):Average)
5
=round(A1.avg(Temperature),2)
6
>A4.insert(0,"annual",A5)

The computation in A4 is shown below: