I'm working with weather data and need to do a boundary analysis for each element of my database. I need to do loops because my database is too big, but I do not know where to start.
A part of my file is this:
dia hora data tem_1min
1 1.0000 01/01/2012 20.463
1 1.0417 01/01/2012 20.071
1 1.0833 01/01/2012 19.462
1 1.1250 01/01/2012 19.4
1 1.1667 01/01/2012 18.528
1 1.2083 01/01/2012 18.428
1 1.2500 01/01/2012 18.411
1 1.2917 01/01/2012 19.087
1 1.3333 01/01/2012 20.063
1 1.3750 01/01/2012 21.393
1 1.4167 01/01/2012 23.722
1 1.4583 01/01/2012 23.809
1 1.5000 01/01/2012 24.49
1 1.5417 01/01/2012 22.677
1 1.5833 01/01/2012 22.905
1 1.6250 01/01/2012 24.373
1 1.6667 01/01/2012 25.07
1 1.7083 01/01/2012 23.197
1 1.7500 01/01/2012 22.631
1 1.7917 01/01/2012 21.32
1 1.8333 01/01/2012 20.503
1 1.8750 01/01/2012 19.583
1 1.9167 01/01/2012 19.911
1 1.9583 01/01/2012 19.876
I need to do the following analysis: 1) Tolerance analysis - if my element (tem- temperature) is varying from 2 to 3 ° C from one hour to another. If this is within this limit, I need to assign a note, where 0 means that it is within the limit, 1 for variation outside that limit and 3 for no data (I have some rows without data). These notes can be either replacing the values in the same column or creating a new one.