How to make a graph with the days at more than 25ª

106 views
Skip to first unread message

enu...@gmail.com

unread,
May 4, 2023, 6:05:20 PM5/4/23
to weewx-user
the days for month in this year.
How can conditions be set?

Tom Keffer

unread,
May 4, 2023, 9:39:04 PM5/4/23
to weewx...@googlegroups.com
Not following your question. 

Have you tried option time_length?

On Thu, May 4, 2023 at 3:05 PM enu...@gmail.com <enu...@gmail.com> wrote:
the days for month in this year.
How can conditions be set?

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c3daa311-f54d-4b34-8f44-8869d0068033n%40googlegroups.com.

enu...@gmail.com

unread,
May 5, 2023, 4:53:31 AM5/5/23
to weewx-user
Yes i have time lenght but i want a graph with the count of days for month in this year or other that the temperature is above than 25º. That is to say, group the temperatures by month and then count how many days in that month there was a temperature greater than 25º
ex:
month-day with temperature above 25
Jan-0
feb-0
mar-2
apr-4
may-6
i don't know where to put the condition outTemp>25

Tom Keffer

unread,
May 5, 2023, 7:56:17 AM5/5/23
to weewx...@googlegroups.com
The NOAA reports do this in a tabular form, but if you want to graph the results, you would have to write a custom aggregation using the xtype system. 

See the xtype extension weewx-xaggs for an example that is fairly close to your requirements. It does plots of historical min and max for each day.

enu...@gmail.com

unread,
May 5, 2023, 8:43:05 AM5/5/23
to weewx-user
OK. Thank you. I thinked that it was a option in the graps section to do this, something like condition=outTemp>25. Would be a interesting option.

enu...@gmail.com

unread,
May 5, 2023, 9:01:39 AM5/5/23
to weewx-user
But. Have I to do a query for each time frame?  That is to say, a query for the days at more 25º in a year group by month and another query for the days at more 25º by year?

Tom Keffer

unread,
May 5, 2023, 9:23:20 AM5/5/23
to weewx...@googlegroups.com
Yes, the option data_type can actually be any SQL SELECT expression, but to do what you want you'll need a GROUP BY expression as well. That's why you'll need an xtype extension.

Still, give it a try!

enu...@gmail.com

unread,
May 5, 2023, 10:52:53 AM5/5/23
to weewx-user
I made days_more_25_year = "SELECT count(*) FROM archive_day_outTemp WHERE STRFTIME('%Y', dateTime,'unixepoch','localtime') = '{year:04d}' AND max>25;" but the graph is empty. I don´t understand because you say that I need GROUP BY. The query must return one row only. One row by year. right?

enu...@gmail.com

unread,
May 5, 2023, 10:54:48 AM5/5/23
to weewx-user
if i put $day.outTemp.days_more_25_year then i get the days at more 25 this year but in the graph [days_more_25_year] not show nothing.

enu...@gmail.com

unread,
May 5, 2023, 11:02:59 AM5/5/23
to weewx-user
I think that the query is not executed. in the graph i have. It's with the belchertown skin.

[temperaturas]   
    time_length = all    
    #aggregate_type = max
    aggregate_interval = year
    type = column
    observation_type = outTemp
    [[dias_a_mas_25_ano]]

Reply all
Reply to author
Forward
0 new messages