reports and graphs

Issue #21 new
Fernando created an issue

All,

Just wanted to report that on the saratoga-weather template the Almanac -> Stations Graphs and Almanac -> Station Monthly Reports are not working.

Thanks!

Comments (12)

  1. Fernando reporter

    Team,

    Is there a chance we can get all the plots/graphs/reports working? I know is not as important as other issues but I can be your lab monkey :D

  2. Gary Roderick

    Let me see what I can do. If we want Saratoga to display the Weewx generated NOAA reports then the issue will be getting them named the same as WD does. I seem to remember when I was getting my Saratoga site to work some time ago that there were a few quirks in how WD names the files. I just want to finish up a few things on testtags.php so give us a couple of days....

  3. Gary Roderick

    Ah, just re-read your post (and the subject title!) and saw graphs - had been focusing my thought on NOAA format reports. Maybe 2.5 days!...

  4. Gary Roderick

    Hi xcom7, sorry had not forgotten, just focused on other things in the post date/time/units calm:) I had another look and both graphs and monthly reports are not quite as straight forward as I thought. I initially thought the monthly reports were simply displaying the monthly NOAA format summary, they are not of course and whilst straightforward enough (and working on the premise of weewx-wd providing a turnkey solution to drive Saratoga with WD plugin), they will require development of another template to provide the WD format monthly report. It appears to be a straightforward template but nonetheless something that will need to be written. Graphs on the other hand will be a bit more of a challenge. Saratoga/WD plugin expects .gif format graphs and limits you you 24hr, 72hr and 7 day graphs with each of the three plots having three sub graphs showing 10 readings in total. I find them very hard to read. Weewx graphing is certainly flexible enough in terms of time scale but by default produces .png (not sure if this can be .gif) and doing the 3 sub graphs I don't know. Weewx graphs I find very easy to read and I much rather like the Saratoga/Weather View plugin approach which fairly much mirrors the current native (ie Standard skin) Weewx graphs, but provided on a neat Saratoga page - I have hacked the wxgraphs.php page to do this for me on my site http://www.therodericks.id.au/saratoga/wxgraphs.php . Again, if we are making a turnkey solution to drive Saratoga/WD plugin then we will have some issues. One approach may be to make a weewx-wd replacement page for wxgraphs.php, very easy to do and could essentially be done by changing a couple of lines of code. All in all probably not the answers you wanted to hear, and I apologise for giving the impression it would be far easier than it now appears. One thing that would help with the monthly reports, do you have a copy of an old WD monthly report that I can use as the basis of producing a template, I can probably drag one off someone's site but am always wary of doing that. Will certainly keep the issue open and will deal with it.

  5. Fernando reporter

    gjr,

    Dont stress it. While I understand your point of view I actually like your hack a lot. And while is not a solution it is an actual work around and a good one. Can you share you hack? I did something similar for the wind plot under the trends :) Check my site.

  6. Oz Greg repo owner

    Because we have split out the clientraw / testtags into sub skins it should now be easier to specify when to generate (the graphs). However the issue of the graphs still does remain..

  7. Gary Roderick

    Currently finalising a template that can produce the WD html monthly report files less the included graphs. Template generating OK on test system, just need to fine tune the report formatting. With move in Weewx2.5.0 to search list extensions this template will need to be provided in its own skin.

  8. Daniel Rich

    gjr,

    Have you made any more progress with this?

    In the meantime, I went ahead and modified wxgraphs.php in my install to just include the StdReport graphs from WeeWX. It isn't perfect, but at least I'm getting some graphs (personally I think the WD graphs are pretty ugly anyway :-) ).

    Here is what I ended up adding, along with code to only show one block at a time. I'm still debugging the show/hide bits, it keeps re-displaying the 24-hour graphs.

            <h2><a href=#"" onclick="set_ajax_uom('dayplots',true);set_ajax_uom('weekplots',false);set_ajax_uom('monthplots',false);">Last 24 Hours</a>
            <p><a href="#" onclick="set_ajax_uom('dayplots',false);set_ajax_uom('weekplots',true);set_ajax_uom('monthplots',false);">Last Week</a>
            <p><a href="#" onclick="set_ajax_uom('dayplots',false);set_ajax_uom('weekplots',false);set_ajax_uom('monthplots',true);">Last Month</h2>
            <div id="dayplots">
            <h1><?php langtrans('Last 24 Hours'); ?></h1> 
              <img src="daytempdew.png"   alt="temperatures" />
              <img src="daytempchill.png" alt="heatchill" />
              <img src="dayrain.png"      alt="rain" />
              <img src="daywind.png"      alt="wind" />
              <img src="daybarometer.png" alt="barometer"/>
              <img src="daywinddir.png"   alt="Hi Wind" />
              <img src="dayinside.png"    alt="Inside" />
              <img src="daywindvec.png"   alt="Wind Vector" />
              <img src="dayrx.png"        alt="day rx percent"/>
            </div> <!-- End id "plots" -->
            <div id="weekplots" style="display: none;">
            <h1><?php langtrans('Last Week'); ?></h1> 
              <img src="weektempdew.png" alt="temperatures" />
              <img src="weektempchill.png" alt="heatchill" />
              <img src="weekrain.png" alt="rain" />
              <img src="weekwind.png" alt="wind" />
              <img src="weekbarometer.png" alt="barometer"/>
              <img src="weekwinddir.png" alt="Hi Wind" />
              <img src="weekinside.png" alt="Inside" />
              <img src="weekwindvec.png" alt="Wind Vector" />
              <img src="weekrx.png" alt="week rx percent"/>
            </div>
            <div id="monthplots" style="display: none;">
            <h1><?php langtrans('Last Month'); ?></h1> 
              <img src="monthtempdew.png" alt="temperatures" />
              <img src="monthtempchill.png" alt="heatchill" />
              <img src="monthrain.png" alt="rain" />
              <img src="monthwind.png" alt="wind" />
              <img src="monthbarometer.png" alt="barometer"/>
              <img src="monthwinddir.png" alt="Hi Wind" />
              <img src="monthinside.png" alt="Inside" />
              <img src="monthwindvec.png" alt="Wind Vector" />
              <img src="monthrx.png" alt="month rx percent"/>
            </div>
    
  9. Log in to comment