# Trend on temperature like on pressure?

**URL:** <https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625>\
**Category:** Feature Requests\
**Created:** [July 25, 2018, 2:56pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625 "2018-07-25T14:56:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Italy](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Max\_Italy](https://community.tempest.earth/u/Max_Italy)\
**Post date:** [July 25, 2018, 2:56pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/1 "2018-07-25T14:56:41Z")

</div>

@corrineb: may I suggest to put a trend indication on temperature too like on pressure?

![image](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex020/uploads/sws/original/2X/a/a41d173010d9d3b4da48a1838082860f7283c55a.png)

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 25, 2018, 4:02pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/2 "2018-07-25T16:02:15Z")

</div>

Such as what I did here…

[https://community.tempest.earth/t/driver-development-for-rti/125?u=garyfunk](https://community.tempest.earth/t/driver-development-for-rti/125?u=garyfunk)

---

<div class="post-metadata">

**Author:** ![corrineb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/corrineb/32/12_2.png) [@corrineb](https://community.tempest.earth/u/corrineb)\
**Post date:** [July 25, 2018, 4:02pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/3 "2018-07-25T16:02:32Z")

</div>

Thanks for the suggestion. We will keep this idea in mind when considering application features.

---

<div class="post-metadata">

**Author:** ![peter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/peter/32/1365_2.png) [@peter](https://community.tempest.earth/u/peter)\
**Post date:** [July 27, 2018, 5:20pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/4 "2018-07-27T17:20:10Z")

</div>

@GaryFunk Out of interest, what cut offs do you use to define if the temperature is falling, rising, or steady?

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 5:41pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/5 "2018-07-27T17:41:52Z")

</div>

```
	diff = (tempNow - temp60MinutesAgo);
	a = Math.abs(diff);
	trend = (diff >=5) ? 'Rising' : (diff <= -5) ? 'Falling' : 'Steady';
	if (a >= 10) {
		trend = 'Rapid ' + trend;
	}
	trend += s;
	return { 
		trend: trend,
		value: diff
	};

```

I use 5 and 10 degrees in C

---

<div class="post-metadata">

**Author:** ![Max\_Italy](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Max\_Italy](https://community.tempest.earth/u/Max_Italy)\
**Post date:** [July 27, 2018, 6:42pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/6 "2018-07-27T18:42:55Z")

</div>

isn’t 5 degree yet a lot of difference in 1 hour??

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 7:12pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/7 "2018-07-27T19:12:08Z")

</div>

That’s what constitutes a trend.

---

<div class="post-metadata">

**Author:** ![Weather34](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/weather34/32/9316_2.png) [@Weather34](https://community.tempest.earth/u/Weather34)\
**Post date:** [July 27, 2018, 7:48pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/8 "2018-07-27T19:48:54Z")

</div>

temperatures can shift in minute(s) if your sensor is responsive most enthusiasts like to use smaller periods so the difference is reflected when it happens . i would not want to wait an hour to see a temperature trend .most common request i get is 15 minute trend in refernce to temperature numerous others want 5 minute trends one hour is on the high side for temperature based changes. but each to their own…

note if your sensor is responsive to small changes … mine is SHT31 but not as responsive as my old SHT11 for whatever reason…  
 ![image](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex020/uploads/sws/original/2X/a/a4f3d55ae4b4fd68833f855c1089a5db63aa738d.jpeg)

---

<div class="post-metadata">

**Author:** ![Max\_Italy](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Max\_Italy](https://community.tempest.earth/u/Max_Italy)\
**Post date:** [July 27, 2018, 7:52pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/9 "2018-07-27T19:52:09Z")

</div>

This make much more sense IMHO than 5 and 10 degree in a hour. But it’s just my opinion.

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 7:58pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/10 "2018-07-27T19:58:40Z")

</div>

The key word here is trend. A trend is over a longer period of time.

I spent weeks looking at data to determine my formula and you are free to decide for yourself.

---

<div class="post-metadata">

**Author:** ![Weather34](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/weather34/32/9316_2.png) [@Weather34](https://community.tempest.earth/u/Weather34)\
**Post date:** [July 27, 2018, 7:59pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/11 "2018-07-27T19:59:04Z")

</div>

i recall large shifts of temperature drop in 15 minutes last winter of 4-5c when winds shift to the north

---

<div class="post-metadata">

**Author:** ![btst.online](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/btst.online/32/16538_2.png) [@btst.online](https://community.tempest.earth/u/btst.online)\
**Post date:** [July 27, 2018, 8:00pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/12 "2018-07-27T20:00:04Z")

</div>

I could see where it would be OK for 5, 10, 30 and 60 minute trends… Around here, we have storms that cause the temp to drop 10+ degrees in a matter of a minute… (old sailors saying… If the Temp drops the same amount the Wind increases… Get off the water!).

But… then a typical temp variation usually falls in line with @GaryFunk’s way of doing it. I usually see a mean temp of about 90, with fluctuations of about 3-4 degrees either way, within a couple of minutes… but the overall temp is 90…

My 2 cents…

---

<div class="post-metadata">

**Author:** ![Weather34](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/weather34/32/9316_2.png) [@Weather34](https://community.tempest.earth/u/Weather34)\
**Post date:** [July 27, 2018, 8:06pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/13 "2018-07-27T20:06:51Z")

</div>

as i said each to there own. not saying anything is wrong

---

<div class="post-metadata">

**Author:** ![Weather34](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/weather34/32/9316_2.png) [@Weather34](https://community.tempest.earth/u/Weather34)\
**Post date:** [July 27, 2018, 8:09pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/14 "2018-07-27T20:09:35Z")

</div>

i recall now january 2017 we saw 12c drop to zero in thirty minutes spent the next three days watching the snow pile up aprox accumulation at sea leavel was 75cm that was pretty epic for us…

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 8:12pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/15 "2018-07-27T20:12:35Z")

</div>

One thing about living in Colorado is temperature swings. Temperature can change 80° in a less than two hours. Temperatures can fluctuate rapidly many times on a two hour period and end with a net gain/loss of zero.

I may not know much about weather but I do know data and how to read it. @Weather34 That I am a military trained data analyst and was stationed at Sinop in the 70’s should be a hint.

---

<div class="post-metadata">

**Author:** ![Japseed](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Japseed](https://community.tempest.earth/u/Japseed)\
**Post date:** [July 27, 2018, 8:15pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/16 "2018-07-27T20:15:36Z")

</div>

Plus you’re never wrong

---

<div class="post-metadata">

**Author:** ![Max\_Italy](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Max\_Italy](https://community.tempest.earth/u/Max_Italy)\
**Post date:** [July 27, 2018, 8:17pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/17 "2018-07-27T20:17:29Z")

</div>

Need also to understand if code showed is for °F or °C. There’s a little difference…

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 8:21pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/18 "2018-07-27T20:21:44Z")

</div>

I will defer to @WFstaff as he knows more than we amateurs. I will also state that it may need as much as 90 minutes for more accuracy.

And unlike pressure, temperature is much more localized.

---

<div class="post-metadata">

**Author:** ![Max\_Italy](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Max\_Italy](https://community.tempest.earth/u/Max_Italy)\
**Post date:** [July 27, 2018, 8:24pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/19 "2018-07-27T20:24:26Z")

</div>

I think also @weather-display (Brian Hamilton) can share his 5 cents 😃

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [July 27, 2018, 8:24pm UTC](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625/20 "2018-07-27T20:24:58Z")

</div>

> [@Max\_Italy](#):
>
> Need also to understand if code showed is for °F or °C. There’s a little difference…

> [@GaryFunk](#):
>
> I use 5 and 10 degrees in C

I stated C in my original post.

[Next page](https://community.tempest.earth/t/trend-on-temperature-like-on-pressure/1625.md?page=2)
