vendredi 27 mars 2015

Interpolating big data values with SQL

I am fairly new to SQL and big data in general so bear with me here. I have a table of values for a year's worth of weather data. I am looking at temperature and precipitation for every hour of the day (thus around 9000 values), but the problem is that the weather station only recorded precipitation every 6 hours. So, I want to interpolate the time points and obtain values but I'm not sure how to go about doing that. Any help would be greatly appreciated! Here's a snippet of the table:


Year Month Day Hour Temperature Precipitation 2014 1 1 0 -16.5444 0 2014 1 1 1 -10.3455 ***** 2014 1 1 2 -5.34855 ***** 2014 1 1 3 -15.4569 ***** 2014 1 1 4 -4.45666 ***** 2014 1 1 5 -11.2344 ***** 2014 1 1 6 -13.3454 0 2014 1 1 7 -20.2334 ***** 2014 1 1 8 -2.48555 ***** 2014 1 1 9 -5.43554 ***** 2014 1 1 10 -1.34555 ***** 2014 1 1 11 -9.00333 ***** 2014 1 1 12 -6.43555 0.04 2014 1 1 13 -12.3423 ***** 2014 1 1 14 -8.56664 ***** 2014 1 1 15 -15.3498 ***** 2014 1 1 16 -19.2384 ***** 2014 1 1 17 -21.2348 ***** 2014 1 1 18 -23.8778 0.31 2014 1 1 19 -20.8374 ***** 2014 1 1 20 -25.3874 ***** 2014 1 1 21 -21.3445 ***** 2014 1 1 22 -27.4599 ***** 2014 1 1 23 -30.9384 ***** 2014 1 2 0 -25.9085 0.15


Aucun commentaire:

Enregistrer un commentaire