Seasons report all time

177 views
Skip to first unread message

itec

unread,
Oct 21, 2021, 8:40:25 AM10/21/21
to weewx-user
Hi all.
I'm trying to add a new panel to seasons report.
I found I have more than 10 years of data, I think it would be useful to graph all the data available.
I don't know how to set the "time_length" parameter to get all the period time.
"#if $year.UV.has_data" shoud be changed also, but I didn't find a variable for all the time.

Now I tested it with fixed time:
[[10year_images]]
x_label_format = %Y
bottom_label_format = %x %X
time_length = 31536000 # 3650 days
aggregate_type = avg
aggregate_interval = week
show_daynight = false

Thanks
itec

Tom Keffer

unread,
Oct 21, 2021, 8:55:00 AM10/21/21
to weewx-user
That should work, although, of course, you have to specify what you want plotted. Something like:

        [[10year_images]]
            x_label_format = %Y
            bottom_label_format = %x %X
            time_length = 31536000 # 3650 days
            aggregate_type = avg
            aggregate_interval = week
            show_daynight = false
            [[[10yeartempdew]]]
                [[[[outTemp]]]]
                [[[[dewpoint]]]]

To create a tag similar to $year, but works for ten years, you will have to create a search list extension.The Customizing Guide has an example of how to do this. See the section Extending the list.


--
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/8ddef76b-7ea6-40fc-b817-29c1a9aeae20n%40googlegroups.com.

itec

unread,
Oct 21, 2021, 9:54:23 AM10/21/21
to weewx-user
To create a tag similar to $year, but works for ten years, you will have to create a search list extension.The Customizing Guide has an example of how to do this. See the section Extending the list
I found that "alltime" example is exactly what I was looking for.
I'll try to add it in a user script.
Do you think it would be useful to add it in the main code, exacly like $year field?

How can I use alltime to set "time_length" correctly in skin.conf?

thanks
itec

Δημήτρης Βήχος

unread,
Oct 21, 2021, 12:16:11 PM10/21/21
to weewx-user
my aproach to this .

in my page i was replace in seasons skin in statistics page the "rain year" column with "all time records"  . thinking the "rain year" from the "year" statistics difrrents only in rain and all rest prices are the same.

firsy need to install the xstats extension of weewx.

then need to replace the  statistics.inc page . in my case of course all the labes are in greek. this easily change

## statistics module for weewx skins
## Copyright Tom Keffer, Matthew Wall
## See LICENSE.txt for your rights
#errorCatcher Echo
#encoding UTF-8

#set $archive_data = [$day, $week, $month, $year, $alltime]

<div id="statistics_widget" class="widget">
  <div class="widget_title">
    Στατιστικά Σταθμού
  </div>
  <div class="widget_contents">

    <table>
      <tbody>
        <tr>
          <td></td>
          <td></td>
          <th>Ημέρας</th>
          <th class="hilo_week">Εβδομάδας</th>
          <th class="hilo_month">Mήνα</th>
          <th class="hilo_year">Ετους</th>
          <th class="hilo_rainyear">Aπό την αρχή</th>
        </tr>
        <tr>
          <td class="label">$obs.label.outTemp</td>
          <td class="units">$unit.label.outTemp</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.outTemp.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.outTemp.maxtime</span><br/>
            $archive.outTemp.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.outTemp.mintime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.heatindex</td>
          <td class="units">$unit.label.heatindex</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.heatindex.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.heatindex.maxtime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.windchill</td>
          <td class="units">$unit.label.windchill</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.windchill.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.windchill.mintime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.dewpoint</td>
          <td class="units">$unit.label.dewpoint</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.dewpoint.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.dewpoint.maxtime</span><br/>
            $archive.dewpoint.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.dewpoint.mintime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.outHumidity</td>
          <td class="units">$unit.label.outHumidity</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.outHumidity.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.outHumidity.maxtime</span><br/>
            $archive.outHumidity.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.outHumidity.mintime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.barometer</td>
          <td class="units">$unit.label.barometer</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.barometer.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.barometer.maxtime</span><br/>
            $archive.barometer.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.barometer.mintime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.rain</td>
          <td class="units">$unit.label.rain</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.rain.sum.format(add_label=False)</td>
          #end for
        </tr>
        <tr>
          <td class="label">$obs.label.rainRate</td>
          <td class="units">$unit.label.rainRate</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.rainRate.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.rainRate.maxtime</span>
          </td>
          #end for
        </tr>
        #if $day.ET.has_data and $day.ET.sum.raw > 0.0
          <tr>
          <td class="label">$obs.label.ET</td>
          <td class="units">$unit.label.ET</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.ET.sum.format(add_label=False)</td>
          #end for
          </tr>
        #end if
        <tr>
          <td class="label">Mέγιστη Ριπή</td>
          <td class="units">
            $unit.label.wind<br/>
            
          </td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.wind.max.format(add_label=False)<br/>
            $archive.wind.gustdir.ordinal_compass<br/>
            <span class="timestamp">$archive.wind.maxtime</span>
          </td>
          #end for
        </tr>
        <tr>
          <td class="label">Μέση Ταχύτητα Αέρα</td>
          <td class="units">$unit.label.wind</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.wind.avg.format(add_label=False)</td>
          #end for
        </tr>
        <tr>
          <td class="label">Αέρα RMS</td>
          <td class="units">$unit.label.wind</td>
          #for $archive in $archive_data
          <td class="data new_row">$archive.wind.rms.format(add_label=False)</td>
          #end for
        </tr>

        <tr>
          <td class="label">
            Μέσο Διάνυσμα<br/>
            Μέση Διέυθυνση
          </td>
          <td class="units">
            $unit.label.wind<br/>
            
          </td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.wind.vecavg.format(add_label=False)<br/>
            $archive.wind.vecdir.ordinal_compass
          </td>
          #end for
        </tr>

        #if $day.UV.has_data
        <tr>
          <td class="label">$obs.label.UV</td>
          <td class="units">$unit.label.UV</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.UV.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.UV.maxtime</span><br/>
            $archive.UV.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.UV.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.radiation.has_data
        <tr>
          <td class="label">$obs.label.radiation</td>
          <td class="units">$unit.label.radiation</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.radiation.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.radiation.maxtime</span><br/>
            $archive.radiation.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.radiation.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.inTemp.has_data
        <tr>
          <td class="label">$obs.label.inTemp</td>
          <td class="units">$unit.label.inTemp</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.inTemp.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.inTemp.maxtime</span><br/>
            $archive.inTemp.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.inTemp.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.inHumidity.has_data
        <tr>
          <td class="label">$obs.label.inHumidity</td>
          <td class="units">$unit.label.inHumidity</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.inHumidity.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.inHumidity.maxtime</span><br/>
            $archive.inHumidity.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.inHumidity.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.extraTemp1.has_data
        <tr>
          <td class="label">$obs.label.extraTemp1</td>
          <td class="units">$unit.label.extraTemp1</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.extraTemp1.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp1.maxtime</span><br/>
            $archive.extraTemp1.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp1.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.extraTemp2.has_data
        <tr>
          <td class="label">$obs.label.extraTemp2</td>
          <td class="units">$unit.label.extraTemp2</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.extraTemp2.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp2.maxtime</span><br/>
            $archive.extraTemp2.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp2.mintime</span>
          </td>
          #end for
        </tr>
        #end if

        #if $day.extraTemp3.has_data
        <tr>
          <td class="label">$obs.label.extraTemp3</td>
          <td class="units">$unit.label.extraTemp3</td>
          #for $archive in $archive_data
          <td class="data new_row">
            $archive.extraTemp3.max.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp3.maxtime</span><br/>
            $archive.extraTemp3.min.format(add_label=False)<br/>
            <span class="timestamp">$archive.extraTemp3.mintime</span>
          </td>
          #end for
        </tr>
        #end if
      </tbody>
    </table>

  </div>
</div>

my actual page with all time statistics

itec

unread,
Oct 21, 2021, 6:38:27 PM10/21/21
to weewx-user
firsy need to install the xstats extension of weewx.

Wow, this is amazing!
I can create a new extension, and xstats is a good base.
What I can't undestand is how to set the right time_length in order to create graphs with imagegenerator.
itec

gjr80

unread,
Oct 22, 2021, 1:54:59 AM10/22/21
to weewx-user
Hi,

Unfortunately time_length can only be set in skin.conf or overriden from weewx.conf. and consequently there is no ability to dynamically set time_length.

Gary 
Reply all
Reply to author
Forward
0 new messages