stable version (fixed average window, data issue, change time filed to text type in temperature table)