Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

Annual Daily Summary - JavaScript and jQuery version

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
passafras
Posts: 7
Joined: Mon 26 Nov 2012 12:57 am
Weather Station: Oregon Scientific WMR200
Operating System: Windows 10 Pro
Location: Mooral Creek
Contact:

Re: Annual Daily Summary - JavaScript and jQuery version

Post by passafras » Wed 09 Jan 2013 12:02 pm

G'day sfws

OK, I've now a bit of a play with it and got myself tied up a few times, perhaps why code cutting was not my field, on that, yes I go back to IBM mainframes circa 1959 with golf ball terminals, not even vdu or terminals, 1403 printers, the tape drives with vacuum tensioners and punch card programs, if you had it in for the programmer their job stayed on top of the stack. I my first go at operations in the early 80s for a little over a year, with equipment manufactured the year I was born. My last longer fling started in 1996, yet another career change.

Some observations along the way that might help other people starting to have a go. Your comment about the Web Developer tools, under the Tools menu in FireFox was quite useful. Later on I did find when not looking for errors but looking for which css statement was in play that the Inspect tool was really handy especially when working with mulitple css rules/styles from different sheets, it gives a clear indication of which one to look at, with line numbers.

I have changed some things about the layout, http://sassafras.id.au/projects/weather ... ords.shtml not the actual tables, yet, though I will fix my little confusion about the which column was which in the Pressure criterion, but on both my monitors the colours are hard to discriminate, I may change the text colour or style to make it easier to see. I suspect if I find it hard to see the colours others might too. I decided not to make the text or layout any smaller, most screens are on the larger side these days. I am using a 19 inch 4:3 screen as my smaller screen, at 1024 x 768. My larger screen is 21 inch 16:9. That is the reason I have a couple of different css pages, a set just for the daily records page to try and reach a happy medium on layout. I will go through and rationalise the rest, creating some unique div or style names etc so I can reduce the number of sheets. Now that I know how I will use css for the text in my plant pages, there is going to be a major revision there soon to incorporate shtml (SSI) and tidy up various other issues from the earlier years, I've done all the other pages on that part of my site. I find SSI simpler for me to manage than content management systems etc. Before that I will make the rest of the weather pages consistent with my new weather index page

I will have a go at making the colour-key gif a bit clearer or just bigger, I find it hard to see on either screen, maybe I just need better glasses.

Thanks very much for what you have done and taught. http://sandaysoft.com/forum/posting.php ... =18&t=8690#
Paul - Mooral Creek Weather at Sassafras.

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: Annual Daily Summary - JavaScript and jQuery version

Post by sfws » Wed 09 Jan 2013 4:27 pm

passafras wrote:on both my monitors the colours are hard to discriminate, I may change the text colour or style to make it easier to see. I suspect if I find it hard to see the colours others might too.
The intention was always to provide some code that others would change to suit their requirements. The colours were arbitrary, my script and CSS files used a set of distinct colours so it would be easier for someone else to pick which ones to change, I never expected those colours would suit everyone.
EDIT - removed text not relevant any more
Last edited by sfws on Sat 15 Nov 2014 8:55 pm, edited 1 time in total.

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: Annual Daily Summary - JavaScript and jQuery version

Post by sfws » Tue 29 Jan 2013 4:19 pm

ENJOY
I know of just 4 people who use this package, although well over fifty downloads of an earlier version were recorded.

A similar script provides the 'one year ago' figures see http://sandaysoft.com/forum/viewtopic.php?f=14&t=8631, and can be used for extracting other information from dayfile.txt. Another variant I produced and use is just like this one, but you select months instead of years and it displays daily values, based on the same criterion selection as this code, for that month in all available years (hiding rows for 30 and/or 31 for shorter months). I leave further ideas to you.

UPDATE ( May 2014)
The code has been removed from this posting, I will be posting the latest version.

EDITS
A few edits recorded against this post related to correcting my spelling errors from bad typing, but most were simply minor changes resulting in updating the zip included in the package. There were a few improvements in the HTML/script (including moving configurable code into the HTML from the external script), in the documentation (mostly simplifying it), the styling sheet (sorry that has grown rather), and new screenshots (there have been minor improvements since those), meaning I ended up with a lot of edits to the zip and therefore this posting. The final edit has moved paragraphs from this posting to my 26 Jan 2014 posting, so they remain with the zip file.
Last edited by sfws on Tue 06 May 2014 8:53 pm, edited 14 times in total.

Warrandyte
Posts: 41
Joined: Sat 06 Apr 2013 11:46 pm
Weather Station: Fine Offset with Solar
Operating System: Windows XP, 7 8 and 10
Location: TIrrannaville NSW Australia

Re: Annual Daily Summary - JavaScript and jQuery version

Post by Warrandyte » Tue 14 Jan 2014 3:37 am

In the Java version, what causes the rows at the bottom of the table to change from Total to Max or Min?
I gather there's some sfws / DAJ Trickery I've not seen here.
any help would be appreciated.
Ive finally solved my dayfile upload issues (I thought) as text files are treated differently and the server time is different to the PC time!

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: Annual Daily Summary - JavaScript and jQuery version

Post by sfws » Tue 14 Jan 2014 6:42 pm

Warrandyte wrote:any help would be appreciated.
You need to make it clearer to me, what you want help with. What do you want to achieve?
Warrandyte wrote: what causes the rows at the bottom of the table to change from Total to Max or Min?
I gather there's some sfws / DAJ Trickery I've not seen here.
If you quote me the version number in the script you are looking at, I can research exactly what code I included at that time. So whatever you want help with, it is definitely within coding originated by me.
There is no trickery, but I only output the statistics at the bottom of the month if there is data in the month so you never see the starting numbers.
Essentially, the condition tests for rainfall, evapotranspiration, sunshine, and wind run. All those figures are totals for a day, rather than extremes for the day. So if is a daily total you see a monthly total too, if it is a daily extreme you see a monthly minimum extreme.
It is as simple as that.
Warrandyte wrote:the server time is different to the PC time
My code does not use local time, the code merely works on the dates stored in the dayfile.txt.
Last edited by sfws on Fri 07 Nov 2014 8:32 pm, edited 3 times in total.

Warrandyte
Posts: 41
Joined: Sat 06 Apr 2013 11:46 pm
Weather Station: Fine Offset with Solar
Operating System: Windows XP, 7 8 and 10
Location: TIrrannaville NSW Australia

Re: Annual Daily Summary - JavaScript and jQuery version

Post by Warrandyte » Tue 14 Jan 2014 11:00 pm

version in use is 5.6

I am looking at getting appropriate totals (e.g. max, min, total, average) to display in the totals column.
I appreciate that not all of these are appropriate for each display but couldnt find what actually drove them to display.

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: Annual Daily Summary - JavaScript and jQuery version

Post by sfws » Wed 15 Jan 2014 7:08 am

This posting contains the final version I developed in this alternative approach, any previous versions posted earlier in this thread have been removed. At my last check, nobody who expressed interest in the past is still actively using my code, so I conclude it is time to finish with this design.

I say final as I have started using a database with PHP reading from that, via MySQL, instead of needing script to search the logfiles, so I have no interest in developing this alternative any further. Although I used code basically similar to that posted here on my own offline Apache web server based testing site, it has now been replaced with a PHP version that uses the daily table on the database, and builds and populates the table in the php script. In case it is of interest to anyone, my PHP version, has a HTML form where you select 1) a database column, 2) an action (show a single database column, show two database columns in the twin cell output of my jQuery project, show the two data base column values in one cell and show either the difference or the mean in the other cell), 3) select the second database column if required, 4) select the end month and end year of a 12 month period to display. Thus, like the jQuery version, the 12 month period displayed does not need to start at January. Other aspects of the PHP script are the same, monthly highest, lowest, and in appropriate cases monthly total are shown; time-stamps if selected as second column are validated to be for the criterion in first selected column and then shown against the monthly highest and monthly lowest with conversion to calendar date for 9am rollover; if range or average selected, the monthly highest and lowest of both the individual values and the calculated range or average are shown. The form results are put into a query-string, so when calling the script from another web page, you can specify form defaults specific to calling page. I have not posted my script here, because the topic heading would not be appropriate, but you can PM me for my script.

If there are any online sites using my code I would appreciate if they could be referenced from the Wiki article at http://wiki.sandaysoft.com/a/AnnualDataSummary. If you PM me with the URL for your site, I can update Wiki if you do not want to. Although I cannot guarantee my code will work in whatever environment you use, because I only did limited testing due to constraints on both my PC and my time, I was using it for a long time and did not have any problems with the windows and browser settings I used. Although I'm not maintaining this code any more, if you did happen to find a bug and then a solution, I'm happy for you to share your new version on this forum.

I do still use a variant of this code where you pick a month to show and that month is displayed day by day for all years in the daily summary log. So it looks similar to the output from my code posted here but with columns headed with years rather than months. I added graphs to the page so I can instantly see the way the month is different in each year. I found I used this variant more frequently than looking at what I posted here, another reason why I have labelled what I posted here as my final version.

EDIT:
(I promise I will find time to work through all my old posts, editing them so they make sense against my final version).
Warrandyte wrote:average
Note that in response to Warrandyte version 6.4 has changed version 6.3 so it now includes code for calculation of average, but the main change is better code to reduce searching for required records (it remembers where it finds particular dates).

DAILY_CODEv6.4.zip
PACKAGE
The package contains
*a HTML file that does not need processing by Cumulus,
*copies of the utf-8 versions of the standard 1.9.4 web templates (with an expanded set of links that include the new page),
*an augmented CSS file,
*a smaller external script that defines all diagnostics, labels, and headings, so these can be tailored easily to your language requirements,
*both packed and source versions of the larger external script that actually generates the HTML to produce the calendar style table,
*a copy of jQuery library (used to simplify many actions and make the code work in multiple browsers), you may choose to use a more recent or older version of this library or to to use one of the CDN servers (for jQuery change 'src' properties to point to Google CDN, Microsoft CDN, CDNJS CDN, or jsDelivr CDN e.g. src="//code.jquery.com/jquery-2.1.1.min.js").
*some test daily log data,
*a few example screenshots,
*some documentation about the package supplied in open document format (international standard) and portable document format (most people have one of many free readers available).

If you do make use of my code, I would appreciate a link back to this topic as a credit. Don't forget there are links to other topics in this forum which display daily data from the Wiki article http://wiki.sandaysoft.com/a/Daily_Summary
You do not have the required permissions to view the files attached to this post.
Last edited by sfws on Mon 27 Jan 2014 1:11 pm, edited 1 time in total.

Post Reply