1
$\begingroup$

I am interested to show the historical temperatures in my city, but I have many missing values. Indeed, I have 4 diferents geographical points (stations) in the city with historical registred temperatures. My data base is organizaed by monthly along the last 50 years. For each of the 4 points in the city and for each month, I have 3 variables: average of Minimum Temperature, average of maximun Temperature and average compensated temperature. My dataset is organized like this (using R), where 83049 and 83695 are the firs two points (stations). I show only two points, but I have 4 points.

head(data)
        Data 83049_TempMaximaMedia 83049_TempCompensadaMedia 83049_TempMinimaMedia 83695_TempMaximaMedia 83695_TempCompensadaMedia 83695_TempMinimaMedia
1 1985-01-31              28,08710                        NA             18,938710                    NA                        NA                    NA
2 1985-02-28              31,08214                        NA             18,946429                    NA                        NA                    NA
3 1985-03-31              29,76129                        NA             19,396774                    NA                        NA                    NA
4 1985-04-30              28,79000                        NA             16,110000                    NA                        NA                    NA
5 1985-05-31              25,42581                        NA             12,190323                    NA                        NA                    NA
6 1985-06-30              24,67333                        NA              7,363333                    NA                        NA                    NA

and

tail(data)
          Data 83049_TempMaximaMedia 83049_TempCompensadaMedia 83049_TempMinimaMedia 83695_TempMaximaMedia 83695_TempCompensadaMedia 83695_TempMinimaMedia
365 2017-03-31              29,33548                        NA             17,545161              33,25484                  26,61273              21,90000
366 2017-04-30              27,04667                        NA             16,556667              31,36000                  25,10917              20,70333
367 2017-05-31              24,83548                  18,14710             13,258065              28,44194                  22,64400              18,19677
368 2017-06-30              25,64333                  17,68857             11,710000              28,47667                  21,92714              17,43667
369 2017-07-31              23,81936                  15,42968              9,374194              25,69355                  19,73806              15,41613
552 2017-08-31                    NA                        NA                    NA              28,28387                  21,19333              15,90323

What is the correct methodologic procedure to input the missing data? Is there some package in R to do this?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.