[weewx-user] How to use the .years iterator

2018-03-04 Thread gjr80
Hi,

With an out of the box weeWX install there is no ability to iterate over all of 
the years of data in your archive (well you should be able to do something with 
$span but that would be limited to the last x years rather than all data). 
However, if you install the xstats example included with weeWX, you then have 
access to the tag $alltime which gives you access to stats on all your data. 
You should then be able to do something like (untested):

#for $year in $alltime.years
$year.outTemp.max
#end for

The examples directory should have been included when weeWX was installed, you 
might find it in /home/weewx for a setup.py install. Alternatively you can find 
it on github (https://github.com/weewx/weewx/tree/master/examples/xstats). I 
suggest you install xstats manually rather than using wee_extension as all you 
need is the xstats.py file not the whole skin that the extension installer 
would install. The readme included with xstats has instructions for 
installation and use.

Gary

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] How to use the .years iterator

2018-03-04 Thread Louis De Lange


In a template  am trying to create a table showing the average temperature 
for the month to date and then a historical list of the avg temp for all 
months in the datebase.

I tried doing this with the iterators and I note the following example in 
the customization guide

#for $month in $year.months
$month.dateTime.format("%B"): Min, max temperatures: $month.outTemp.min 
$month.outTemp.max#end for


This intuitively makes sense, but lets say I want to iterate this same 
iteration loop over all the years in the database.  I can quite figure out 
how to use the .years iteration loop

#for $year in .years

What would replace the 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.