Hello,
I am writing a Xtype extension providing a new aggregate type that calculates a rolling average of a parameter over years.
I started by defining several different aggregate type for different number of years, such as :
rolling_avg_years1
rolling_avg_years5
rolling_avg_years10
rolling_avg_years15
For exemple : $day.outTemp.rolling_avg_years10 returns the average temperature of the last 3650 days (i.e. 10 years).
And it works.
But, to allow more flexibility, I would prefer, if possible, to have the number of years as parameter, such as
rolling_avg_years(10)
but I don't know how I could retrieve the parameter in the get_aggregate function of my extension.
$day.outTemp.rolling_avg_years(10)
get_aggregate('outTemp', timespan, 'rolling_avg_years', db_manager, val=10)
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/c17fbd97-4547-4a36-bfc0-35b10aa3b68bn%40googlegroups.com.

You received this message because you are subscribed to a topic in the Google Groups "weewx-development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-development/RyO1T4UFFBk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zECGbOo6rT7mNdRFvRQAq6TNmWKZO6NZ7evDA6mvUz925g%40mail.gmail.com.
<trol10_OK.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEAdazMEO%3DbR1%2BXYEDYm7ccaucL746gjA6zjtyM1iDyvWg%40mail.gmail.com.
<xtypes.py>