Yes, but I need these values day after day. What my old program was doing. It therefore seems to me that the best solution is to create a specific table. I would create it with my old data, then I would read the Archive table of the MySQL base of Wewx, to add the new value daily. Le mercredi 18 mai 2022 à 19:26:40 UTC+2, tke...@gmail.com a écrit :
> Well, it would be easy enough to create a CSV file using a WeeWX template. > It could then be imported into Excel. Something like... > > #for $month in $year.months > #if $month.outTemp.has_data > $month.dateTime.format($YM), > $month.heatdeg.sum.format($Temp,$NONE,add_label=False), > $month.cooldeg.sum.format($Temp,$NONE,add_label=False) > > #end if > > #end for > > > would produce something like this, where the columns are year month, > heating degrees, cooling degrees > > 2022 01, 986.2, 0.0 > 2022 02, 713.5, 0.0 > 2022 03, 579.6, 0.0 > 2022 04, 625.1, 0.0 > 2022 05, 75.0, 0.0 > > > > > On Wed, May 18, 2022 at 10:11 AM PC <blaise....@gmail.com> wrote: > >> >> " You haven't said what your use case is. It might be quite simple." >> You are right. >> My goal is to make statistical comparisons since the start of my surveys >> (from 2011 with a "View View" and which will be placed in another table). >> Previously, under Windows 7, I was doing these statistics in VBA >> ms-access ... >> It is already a challenge for me (former computer trainer mainly >> exclusively in Windows, Excel, Access & Cie) and now pensioner to go to >> Linux! >> >> There are also and especially comparisons to seasonal norms >> Just that is a big job that I was doing in several steps. >> And then, that is done, they are written in a table in HTML format. >> >> Le mercredi 18 mai 2022 à 18:39:32 UTC+2, tke...@gmail.com a écrit : >> >>> You haven't said what your use case is. It might be quite simple. >>> >>> For example, here is how you would calculate total heating degree-days >>> for this month in Python, using xtype. Most of the complexity is in >>> calculating the starting and stopping times: >>> >>> import time >>> import weewx.manager >>> import weewx.xtypes >>> import weeutil.weeutil >>> >>> archive_sqlite = { >>> 'database_name': '/home/weewx/archive/weewx.sdb', >>> 'driver': 'weedb.sqlite' >>> } >>> >>> start_tt = (2022, 5, 1, 0, 0, 0, 0, 0, -1) >>> end_tt = (2022, 6, 1, 0, 0, 0, 0, 0, -1) >>> start_ts = time.mktime(start_tt) >>> end_ts = time.mktime(end_tt) >>> timespan = weeutil.weeutil.TimeSpan(start_ts, end_ts) >>> >>> with weewx.manager.DaySummaryManager.open(archive_sqlite) as db_manager: >>> result = weewx.xtypes.get_aggregate('heatdeg', timespan, 'sum', >>> db_manager) >>> >>> print(result) >>> >>> On Wed, May 18, 2022 at 9:29 AM PC <blaise....@gmail.com> wrote: >>> >>>> Yes, >>>> I just looked at, it's really too complicated to implement for what I >>>> want to do. >>>> It would even be easier to calculate him himself! >>>> Besides, in French, we say "why make it simple when you can make it >>>> complicated!?" >>>> It is not complicated to calculate it once a day and store it in a >>>> small table. >>>> >>>> Le mercredi 18 mai 2022 à 18:11:34 UTC+2, PC a écrit : >>>> >>>>> Okay, >>>>> >>>>> I don't know this "xtype", I'm going to watch. >>>>> I already have the difficulty of "binding" 2 tables (see my previous >>>>> post) >>>>> One more challenge, it's pleasant! >>>>> >>>>> Le mercredi 18 mai 2022 à 18:01:45 UTC+2, tke...@gmail.com a écrit : >>>>> >>>>>> Degree-days are calculated on the fly as an xtype >>>>>> <https://github.com/weewx/weewx/wiki/WeeWX-V4-user-defined-types> >>>>>> variable. >>>>>> >>>>>> Where do you need them? For example, for a template, the total >>>>>> degree-days for a month could be calculated as $month.heatdeg.sum. >>>>>> >>>>>> If you need access from an outside application, then you'd have to >>>>>> use the xtype's Python interface. >>>>>> >>>>>> On Wed, May 18, 2022 at 8:48 AM PC <blaise....@gmail.com> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> It seems to me that DegreeDays are not stored in the table (MySQL) >>>>>>> archive. >>>>>>> Are they elsewhere? How can I get it through a third-party >>>>>>> application? >>>>>>> >>>>>>> Thank you ! >>>>>>> >>>>>>> -- >>>>>>> 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/2bb706a9-dcb5-4773-8f15-80df8fceafccn%40googlegroups.com >>>>>>> >>>>>>> <https://groups.google.com/d/msgid/weewx-user/2bb706a9-dcb5-4773-8f15-80df8fceafccn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>> 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/208e0c7c-4936-4342-99d6-6270f17bb4e6n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/208e0c7c-4936-4342-99d6-6270f17bb4e6n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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/35a89231-3dc1-4148-bbaf-f887166c7607n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/35a89231-3dc1-4148-bbaf-f887166c7607n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c7ef7c31-7abf-4449-b29b-4fe7f1b36882n%40googlegroups.com.