## Copyright 2009-2021 Tom Keffer
## Distributed under terms of GPLv3.  See LICENSE.txt for your rights.
#errorCatcher Echo
#encoding UTF-8
##
<!DOCTYPE html>
<html lang="$lang">
  <head>
    ## Specifying an encoding of UTF-8 is usually safe:
    <meta charset="UTF-8">
    <title>$station.location $gettext("Yearly Weather Summary")</title>
    <link rel="stylesheet" type="text/css" href="weewx.css"/>
    <link rel="icon" type="image/png" href="favicon.ico" />
    #if $station.station_url
    <link rel="canonical" href="$station.station_url/$filename" />
    #end if
    <script type="text/javascript">
      function openURL(urlname)
      {
        window.location=urlname;
      }
    </script>
  </head>

  <body>
    <div id="container">
      <div id="masthead">
        <h1>$station.location</h1>
        <h2>$gettext("Yearly Weather Summary")</h2>
          <h2>$current.dateTime</h2>
      </div>

      <div id="stats_group">

        <div class="stats">
          <div class="stats_header">
            $gettext("Calendar Year")
          </div>

          <table>
            <tbody>
              <tr>
                <td class="stats_label">
                  $gettext("High Temperature")<br/>
                  $gettext("Low Temperature")
                </td>
                <td class="stats_data">
                  $year.outTemp.max $gettext("at") $year.outTemp.maxtime<br/>
                  $year.outTemp.min $gettext("at") $year.outTemp.mintime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Heat Index")
                </td>
                <td class="stats_data"> 
                  $year.heatindex.max $gettext("at") $year.heatindex.maxtime
                </td>
              </tr>
              <tr>
                <td class="stats_label"> 
                  $gettext("Low Wind Chill")
                </td>
                <td class="stats_data"> 
                  $year.windchill.min $gettext("at") $year.windchill.mintime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Humidity")<br/>
                  $gettext("Low Humidity")
                </td>
                <td class="stats_data">
                  $year.outHumidity.max $year.outHumidity.maxtime<br/>
                  $year.outHumidity.min $year.outHumidity.mintime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Dewpoint")<br/>
                  $gettext("Low Dewpoint")
                </td>
                <td class="stats_data">
                  $year.dewpoint.max $year.dewpoint.maxtime<br/>
                  $year.dewpoint.min $year.dewpoint.mintime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Barometer")<br/>
                  $gettext("Low Barometer")
                </td>
                <td class="stats_data">
                  $year.barometer.max $gettext("at") $year.barometer.maxtime<br/>
                  $year.barometer.min $gettext("at") $year.barometer.mintime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("Rain Total")
                </td>
                <td class="stats_data">
                  $year.rain.sum
                </td>
              </tr>
              <tr>
                <td class="stats_label"> 
                  $gettext("High Rain Rate")
                </td>
                <td class="stats_data">
                  $year.rainRate.max $gettext("at") $year.rainRate.maxtime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Wind")
                </td>
                <td class="stats_data">
                  $year.wind.max $gettext("from") $year.wind.gustdir $gettext("at") $year.wind.maxtime
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("Average Wind")
                </td>
                <td class="stats_data">
                  $year.wind.avg
                </td>
              </tr>
              
              <tr>
                <td class="stats_label">
                  $gettext("RMS Wind")
                </td>
                <td class="stats_data">
                  $year.wind.rms
                </td>
              </tr>

              <tr>
                <td class="stats_label">
                  $gettext("Vector Average Speed")<br/>
                  $gettext("Vector Average Direction")
                </td>
                <td class="stats_data">
                  $year.wind.vecavg<br/>
                  $year.wind.vecdir
                </td>
              </tr>
              <tr>
                <td class="stats_label">
                  $gettext("High Inside Temperature")<br/>
                  $gettext("Low Inside Temperature")
                </td>
                <td class="stats_data">
                  $year.inTemp.max $gettext("at") $year.inTemp.maxtime<br/>
                  $year.inTemp.min $gettext("at") $year.inTemp.mintime
                </td>
              </tr>
              #if $year.UV.has_data
              <tr>
                <td class="stats_label">
                  $gettext("High UV")<br/>
                  $gettext("Low UV")
                </td>
                <td class="stats_data">
                  $year.UV.max $gettext("at") $year.UV.maxtime<br/>
                  $year.UV.min $gettext("at") $year.UV.mintime
                </td>
              </tr>
              #end if
              #if $year.ET.has_data and $year.ET.sum.raw >0.0
              <tr>
                <td class="stats_label">
                  $gettext("High ET")<br/>
                  $gettext("Low ET")
                </td>
                <td class="stats_data">
                  $year.ET.max $gettext("at") $year.ET.maxtime<br/>
                  $year.ET.min $gettext("at") $year.ET.mintime
                </td>
              </tr>
              #end if
              #if $year.radiation.has_data
              <tr>
                <td class="stats_label">
                  $gettext("High Radiation")<br/>
                  $gettext("Low Radiation")
                </td>
                <td class="stats_data">
                  $year.radiation.max $gettext("at") $year.radiation.maxtime<br/>
                  $year.radiation.min $gettext("at") $year.radiation.mintime
                </td>
              </tr>
              #end if
            </tbody>
          </table>
        </div> <!-- End class "stats" -->

        <p>&nbsp;</p>

        <div class="stats">
          <div class="stats_header">
            $gettext("Rain Year") (1-$station.rain_year_str start)
          </div>

          <table>
            <tbody>
              <tr>
                <td class="stats_label">
                  $gettext("Rain Year Total")
                </td>
                <td class="stats_data">
                  $rainyear.rain.sum
                </td>
              </tr>
              <tr>
                <td class="stats_label"> 
                  $gettext("High Rain Rate")
                </td>
                <td class="stats_data">
                  $rainyear.rainRate.max $gettext("at") $rainyear.rainRate.maxtime
                </td>
              </tr>
            </tbody>
          </table>
        </div> <!-- End class "stats" -->

      </div> <!-- End class "stats_group" -->

      <div id="content">
        
        <div class="header">
          <h3>$gettext("Yearly Statistics and Plots")</h3>
        </div>
        <div id="plots">
          <img src="yeartempdew.png" alt="temperatures" />
          <img src="yeartempchill.png" alt="heatchill" />
          <img src="yearhumidity.png"  alt="outside humidity" />
          <img src="yearhilow.png" alt="Daily highs and lows for the year" title="Daily highs and lows for the year"/>
          <img src="yearrain.png" alt="rain" />
          <img src="yearwind.png" alt="wind" />
          <img src="yearbarometer.png" alt="barometer"/>
          <img src="yearwinddir.png" alt="Hi Wind" />
          <img src="yearinside.png" alt="Inside" />
          <img src="yearwindvec.png" alt="Wind Vector" />
          #if $year.radiation.has_data
          <img src="yearradiation.png" alt="Radiation" />
          #end if
          #if $year.UV.has_data
          <img src="yearuv.png" alt="UV Index" />
          #end if
          #if $year.rxCheckPercent.has_data
          <img src="yearrx.png" alt="year rx percent"/>
          #end if
        </div>
      </div> <!-- End id "content" -->

      <div id="navbar">
        <input type="button" value=$pgettext("Buttons","Current") onclick="openURL('index.html')" />
        <input type="button" value=$pgettext("Buttons","Week") onclick="openURL('week.html')" />
        <input type="button" value=$pgettext("Buttons","Month") onclick="openURL('month.html')" />
        <input type="button" value=$pgettext("Buttons","Year") onclick="openURL('year.html')" />
      </div>
    </div> <!-- End id "container" -->

    ## Include the Google Analytics code if the user has supplied an ID:
    #if 'googleAnalyticsId' in $Extras
    <script type="text/javascript">
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
        try{
            var pageTracker = _gat._getTracker("$Extras.googleAnalyticsId");
            pageTracker._trackPageview();
        } catch(err) {}
    </script>
    #end if

  </body>
</html>
