Definitely a useful feature. Could you submit a GitHub pull request
instead? It's much easier to manage the merge that way.

-tk

On Sat, Feb 24, 2018 at 2:39 AM, <[email protected]> wrote:

> I have noticed a number of people requesting a way to show accumulated
> data in the graphs for Weewx, mostly rain data. As I also need this myself,
> I did a shot on how to implement it.
>
> As suggested in a post I saw, the solution was to add another aggregation
> type, called 'accu', which is then grapped in weewx/manager.py and handled
> to sum the data from the first point in the selected data interval,
> starting from zero. You may then use it for any interval needed.
>
> To ease the implementation, it is only supported if an aggregate_interval
> is also defined, even if this was not strictly needed.
>
> I have only changed the file [/usr/share/weewx/]weewx/manager.py, based
> on weewx v3.7.1. It is attached.
>
> To use it, just set the aggregate_type to accu in the skin.conf file, like:
>         [[[dayrain]]]
>             # Make sure the y-axis increment is at least 0.02 for the rain
> plot
>             yscale = None, None, 0.02
>             plot_type = bar
>             [[[[rain]]]]
>                 aggregate_type = sum
>                 aggregate_interval = 3600
>                 label = Rain (hourly total)
>
>         [[[dayraintot]]]
>             yscale = None, None, 0.02
>             plot_type = bar
>             [[[[rain]]]]
>                 aggregate_type = accu
>                 aggregate_interval = 600
>                 label = Rain (accumulated)
>
>
> You may want to have a smaller aggregate_interval for the accu than for
> the sum.
> This of cause is only usable for 'counting' datatypes. Trying to use it on
> eg. temperature will not give meaningfull results.
>
> Please fill free to use it, and if it is good enough, to integrate it into
> the main code branch.
>
> Best regards
> Henrik
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to