Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

AnnualDataSummary PHP

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
KevinF
Posts: 71
Joined: Sat Apr 14, 2012 5:01 pm
Weather Station: WMR200
Operating System: XP SP3
Location: Lancashire

Re: AnnualDataSummary PHP

Postby KevinF » Tue Nov 20, 2012 5:54 pm

Kiwi? That's good shoe polish! :lol:

BCJKiwi
Posts: 851
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: AnnualDataSummary PHP

Postby BCJKiwi » Tue Nov 20, 2012 10:07 pm

KevinF wrote:Kiwi? That's good shoe polish! :lol:

Just like most things from New Zealand!

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: AnnualDataSummary PHP

Postby gemini06720 » Tue Nov 20, 2012 10:30 pm

BCJKiwi wrote:Ray, you know who I am as we have exchanged emails. Those are my real initials plus an indication of where in the world I am. I trust you know what a Kiwi is and where it comes from...
Indeed, Mr. B - I found the exchanges we had ... association now completes... ;)

The only thing I know about kiwis is that I have stopped eating them (for the same reason mentioned below)... :mrgreen:

BCJKiwi wrote:Just like most things from New Zealand!
I used to enjoy the New Zealand lamb but now find it tasteless ... that is why I pay a bit more money and get my lamb from an island producer (ie: Vancouver Island, British Columbia, Canada)... :D

User avatar
beteljuice
Posts: 2468
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: AnnualDataSummary PHP

Postby beteljuice » Wed Nov 21, 2012 4:17 am

Maintaining legibility especially in the vertical (column) plane for a 'twinned' data entry has proved interesting.

Although I think temperatures in F would be tight, and comparing say high / low pressure would break the cell formating.

The beteljuice attempt using BCJkiwi 'buttons' and Ron's (nitrix) data.
beteljuice attempt
Last edited by beteljuice on Wed Nov 21, 2012 11:34 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
mcrossley
Posts: 5147
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: AnnualDataSummary PHP

Postby mcrossley » Wed Nov 21, 2012 3:31 pm

Hmm, personally I find these double entries too hard to read, I don't think the slash makes it any easier, a space/double space may be better.

User avatar
beteljuice
Posts: 2468
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: AnnualDataSummary PHP

Postby beteljuice » Wed Nov 21, 2012 6:38 pm

Nice idea, but somehow it feels 'uncomfortable' .. Take #2

... and again with eg. deg, F would become even more confusing - I think any kind of 'double-entry' would have to be judiciously considered upon it's unique output.
Last edited by beteljuice on Thu Nov 22, 2012 4:53 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

BCJKiwi
Posts: 851
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: AnnualDataSummary PHP

Postby BCJKiwi » Thu Nov 22, 2012 1:53 am

Well perhaps you can see why I decided to concatenate the double columns into one.

12.3/23.4
12.3/23.4
12.3/23.4
12.3/23.4

12.3 / 23.4
12.3 / 23.4
12.3 / 23.4
12.3 / 23.4

12.3 23.4
12.3 23.4
12.3 23.4
12.3 23.4

| 12.3 | 23.4 |
| 12.3 | 23.4 |
| 12.3 | 23.4 |
| 12.3 | 23.4 | - if you have a table with borders.

Layout does not really work here as the BBS strips out extra spaces but I guess you get the idea.

"you pays your money and you takes your choice"

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: AnnualDataSummary PHP

Postby gemini06720 » Thu Nov 22, 2012 2:51 am

Indeed Mark, the double entries are very difficult to read for most people - I had some double entries months ago when I first installed the original script - then I got some comments from my users/visitors as the double entries, because the font size had to be reduced (to fit within the same space) were quite difficult to read (many of my users are 50+) - thus, I re-wrote the original script, added all the tags available from Cumulus, and deactivated all double entries. I have not received any comments from my 'audience'... ;)

BCJKiwi
Posts: 851
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: AnnualDataSummary PHP

Postby BCJKiwi » Thu Nov 22, 2012 11:40 pm

Back to the new year rollover - Oh dear not yet quite right.
We do need to -1 day.
Have looked in detail at what is on the hoster.
It is the 23/11/2012 here in NZ
The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
Cumulus (well, Windows 7) shows the exact same time stamp.
The data is for the 22nd.

The best solution I could come up with that should work regardless of the rollover time is :-

Code: Select all

// was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
   if (isset($_GET['year'])) {
      $tableYear=$_GET['year'];
   } else {
      if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
         $tableYear = date("Y", filemtime($dayfile)) -1 ;
         } else {
         $tableYear = date("Y", filemtime($dayfile)) ;
         }
      }
i.e. if the mod date of the file is the first day of the year use the previous year.

User avatar
mcrossley
Posts: 5147
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: AnnualDataSummary PHP

Postby mcrossley » Fri Nov 23, 2012 5:16 pm

I have tried adding some column banding to my page, I think this helps particularly with the 'double column format?
http://weather.wilmslowastro.com/datasummary.php

BCJKiwi
Posts: 851
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: AnnualDataSummary PHP

Postby BCJKiwi » Sat Nov 24, 2012 1:03 am

Agreed, a significant improvement.

The issue for me with the original script was that all the columns are the same width and with the data centred there is no way to intuitively know which columns are a pair. The column headers being right aligned did not help either.
This became more annoying once most pages had double columns.

Your solution resolves this. However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup, then a number of options arise,
A vertical border either side of the pair.
More padding on the left of the right column and on the right of the left column.

Much food for thought.

User avatar
beteljuice
Posts: 2468
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: AnnualDataSummary PHP

Postby beteljuice » Sat Nov 24, 2012 4:03 am

However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup
It is relatively straightforward to either overide or declare a (new) class / style so that eg. the 2nd (right) column of the pair was left justified. The existing cell padding would leave a differential gap.

In the tests I posted you will notice that this technique was used to center justify the headers over 'dual entry' columns.
Image
......................Imagine, what you will KNOW tomorrow !

sfws
Posts: 409
Joined: Fri Jul 27, 2012 11:29 am
Weather Station: Customised Fine Offset
Operating System: off-line Vista and W10 PCs
Location: UK

Re: AnnualDataSummary PHP

Postby sfws » Tue Jan 01, 2013 2:31 pm

BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.

I've posted in http://sandaysoft.com/forum/viewtopic.php?f=18&t=6640 an update on year rollover - including a comparison of the PHP version you developed in this thread and the PHP version you've linked to from the Wiki. Could be a difference in our time zones issue or an error on my part, but one seemed on your 1 January to try to display 2013 before it was available, but all is right now its 2 January for you.

I edited the Wiki yesterday, and moved the bit I inserted to directly after your subsequent insert, trying to complement your style. I have put some explanation of my changes in http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 following on from the experiences noted there of someone trying to implement the JavaScript version.

BCJKiwi
Posts: 851
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: AnnualDataSummary PHP

Postby BCJKiwi » Wed Jan 02, 2013 2:01 am

This year rollover date fix (Posted 5 posts above this) survived the new Year and worked as expected.
BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.
We do need to -1 day.
Have looked in detail at what is on the hoster.
It is the 23/11/2012 here in NZ
The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
Cumulus (well, Windows 7) shows the exact same time stamp.
The data is for the 22nd.

The best solution I could come up with that should work regardless of the rollover time is :-

Code: Select all

// was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
   if (isset($_GET['year'])) {
      $tableYear=$_GET['year'];
   } else {
      if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
         $tableYear = date("Y", filemtime($dayfile)) -1 ;
         } else {
         $tableYear = date("Y", filemtime($dayfile)) ;
         }
      }
i.e. if the mod date of the file is the first day of the year use the previous year.


Return to “3rd Party Tools”

Who is online

Users browsing this forum: No registered users and 1 guest